@Stability.Volatile public class ReactiveCollectionManager extends Object
ReactiveCollectionManager provides APIs to manage collections and scopes within a bucket.| Constructor and Description |
|---|
ReactiveCollectionManager(AsyncCollectionManager async)
Creates a new
ReactiveCollectionManager. |
| Modifier and Type | Method and Description |
|---|---|
Mono<Void> |
createCollection(CollectionSpec collectionSpec)
Deprecated.
This method cannot be used to set the collection's "history" property.
Please use
createCollection(String, String, CreateCollectionSettings) instead. |
Mono<Void> |
createCollection(CollectionSpec collectionSpec,
CreateCollectionOptions options)
Deprecated.
This method cannot be used to set the collection's "history" property.
Please use
createCollection(String, String, CreateCollectionSettings, CreateCollectionOptions) instead. |
Mono<Void> |
createCollection(String scopeName,
String collectionName,
CreateCollectionSettings settings)
Creates a collection if it does not already exist with custom options.
|
Mono<Void> |
createCollection(String scopeName,
String collectionName,
CreateCollectionSettings settings,
CreateCollectionOptions options)
Creates a collection if it does not already exist with custom options.
|
Mono<Void> |
createScope(String scopeName)
Creates a scope if it does not already exist.
|
Mono<Void> |
createScope(String scopeName,
CreateScopeOptions options)
Creates a scope if it does not already exist with custom options.
|
Mono<Void> |
dropCollection(CollectionSpec collectionSpec)
Deprecated.
Please use
dropCollection(String, String) instead. |
Mono<Void> |
dropCollection(CollectionSpec collectionSpec,
DropCollectionOptions options)
Deprecated.
Please use
dropCollection(String, String, DropCollectionOptions) instead. |
Mono<Void> |
dropCollection(String scopeName,
String collectionName)
Drops a collection if it exists.
|
Mono<Void> |
dropCollection(String scopeName,
String collectionName,
DropCollectionOptions options)
Drops a collection if it exists with custom options.
|
Mono<Void> |
dropScope(String scopeName)
Drops a scope if it exists.
|
Mono<Void> |
dropScope(String scopeName,
DropScopeOptions options)
Drops a scope if it exists with custom options.
|
Flux<ScopeSpec> |
getAllScopes()
Returns all scopes in this bucket.
|
Flux<ScopeSpec> |
getAllScopes(GetAllScopesOptions options)
Returns all scopes in this bucket with custom options.
|
Mono<ScopeSpec> |
getScope(String scopeName)
Deprecated.
use
getAllScopes() instead. |
Mono<ScopeSpec> |
getScope(String scopeName,
GetScopeOptions options)
Deprecated.
use
getAllScopes(GetAllScopesOptions) instead. |
Mono<Void> |
updateCollection(String scopeName,
String collectionName,
UpdateCollectionSettings settings)
Updates a collection with custom options.
|
Mono<Void> |
updateCollection(String scopeName,
String collectionName,
UpdateCollectionSettings settings,
UpdateCollectionOptions options)
Updates a collection with custom options.
|
@Stability.Internal public ReactiveCollectionManager(AsyncCollectionManager async)
ReactiveCollectionManager.
This API is not intended to be called by the user directly, use ReactiveBucket.collections()
instead.
async - the underlying async collection manager.@Deprecated public Mono<Void> createCollection(CollectionSpec collectionSpec)
createCollection(String, String, CreateCollectionSettings) instead.
Note that a scope needs to be created first (via createScope(String)) if it doesn't exist already.
collectionSpec - the collection spec that contains the properties of the collection.Mono completing when the operation is applied or failed with an error.com.couchbase.client.core.error.CollectionExistsException - (async) if the collection already existscom.couchbase.client.core.error.ScopeNotFoundException - (async) if the specified scope does not exist.com.couchbase.client.core.error.CouchbaseException - (async) if any other generic unhandled/unexpected errors.@Deprecated public Mono<Void> createCollection(CollectionSpec collectionSpec, CreateCollectionOptions options)
createCollection(String, String, CreateCollectionSettings, CreateCollectionOptions) instead.
Note that a scope needs to be created first (via createScope(String)) if it doesn't exist already.
collectionSpec - the collection spec that contains the properties of the collection.options - the custom options to apply.Mono completing when the operation is applied or failed with an error.com.couchbase.client.core.error.CollectionExistsException - (async) if the collection already existscom.couchbase.client.core.error.ScopeNotFoundException - (async) if the specified scope does not exist.com.couchbase.client.core.error.CouchbaseException - (async) if any other generic unhandled/unexpected errors.@Stability.Volatile public Mono<Void> createCollection(String scopeName, String collectionName, CreateCollectionSettings settings)
Note that a scope needs to be created first (via createScope(String)) if it doesn't exist already.
scopeName - name of scope to create collection incollectionName - name of collection to createsettings - the collection settingsMono completing when the operation is applied or failed with an error.com.couchbase.client.core.error.CollectionExistsException - (async) if the collection already existscom.couchbase.client.core.error.ScopeNotFoundException - (async) if the specified scope does not exist.com.couchbase.client.core.error.CouchbaseException - (async) if any other generic unhandled/unexpected errors.@Stability.Volatile public Mono<Void> createCollection(String scopeName, String collectionName, CreateCollectionSettings settings, CreateCollectionOptions options)
Note that a scope needs to be created first (via createScope(String)) if it doesn't exist already.
scopeName - name of scope to create collection incollectionName - name of collection to createsettings - the collection settingsoptions - the custom options to apply.Mono completing when the operation is applied or failed with an error.com.couchbase.client.core.error.CollectionExistsException - (async) if the collection already exists.com.couchbase.client.core.error.ScopeNotFoundException - (async) if the specified scope does not exist.com.couchbase.client.core.error.CouchbaseException - (async) if any other generic unhandled/unexpected errors.public Mono<Void> createScope(String scopeName)
scopeName - the name of the scope to create.Mono completing when the operation is applied or failed with an error.com.couchbase.client.core.error.ScopeExistsException - (async) if the scope already exists.com.couchbase.client.core.error.CouchbaseException - (async) if any other generic unhandled/unexpected errors.public Mono<Void> createScope(String scopeName, CreateScopeOptions options)
scopeName - the name of the scope to create.options - the custom options to apply.Mono completing when the operation is applied or failed with an error.com.couchbase.client.core.error.ScopeExistsException - (async) if the scope already exists.com.couchbase.client.core.error.CouchbaseException - (async) if any other generic unhandled/unexpected errors.@Stability.Volatile public Mono<Void> updateCollection(String scopeName, String collectionName, UpdateCollectionSettings settings)
scopeName - name of scope to update collection incollectionName - name of collection to updatesettings - the collection settingsCompletableFuture completing when the operation is applied or failed with an error.com.couchbase.client.core.error.CollectionNotFoundException - (async) if the specified collection does not exist.com.couchbase.client.core.error.ScopeNotFoundException - (async) if the specified scope does not exist.com.couchbase.client.core.error.CouchbaseException - (async) if any other generic unhandled/unexpected errors.@Stability.Volatile public Mono<Void> updateCollection(String scopeName, String collectionName, UpdateCollectionSettings settings, UpdateCollectionOptions options)
scopeName - name of scope to update collection incollectionName - name of collection to updatesettings - the collection settingsoptions - the custom options to apply.CompletableFuture completing when the operation is applied or failed with an error.com.couchbase.client.core.error.CollectionNotFoundException - (async) if the specified collection does not exist.com.couchbase.client.core.error.ScopeNotFoundException - (async) if the specified scope does not exist.com.couchbase.client.core.error.CouchbaseException - (async) if any other generic unhandled/unexpected errors.@Deprecated public Mono<Void> dropCollection(CollectionSpec collectionSpec)
dropCollection(String, String) instead.collectionSpec - the collection spec that contains the properties of the collection.Mono completing when the operation is applied or failed with an error.com.couchbase.client.core.error.CollectionNotFoundException - (async) if the collection did not exist.com.couchbase.client.core.error.ScopeNotFoundException - (async) if the specified scope does not exist.com.couchbase.client.core.error.CouchbaseException - (async) if any other generic unhandled/unexpected errors.@Deprecated public Mono<Void> dropCollection(CollectionSpec collectionSpec, DropCollectionOptions options)
dropCollection(String, String, DropCollectionOptions) instead.collectionSpec - the collection spec that contains the properties of the collection.options - the custom options to apply.Mono completing when the operation is applied or failed with an error.com.couchbase.client.core.error.CollectionNotFoundException - (async) if the collection did not exist.com.couchbase.client.core.error.ScopeNotFoundException - (async) if the specified scope does not exist.com.couchbase.client.core.error.CouchbaseException - (async) if any other generic unhandled/unexpected errors.@Stability.Volatile public Mono<Void> dropCollection(String scopeName, String collectionName)
scopeName - name of scope to drop collection fromcollectionName - name of collection to dropMono completing when the operation is applied or failed with an error.com.couchbase.client.core.error.CollectionNotFoundException - (async) if the collection did not exist.com.couchbase.client.core.error.ScopeNotFoundException - (async) if the specified scope does not exist.com.couchbase.client.core.error.CouchbaseException - (async) if any other generic unhandled/unexpected errors.@Stability.Volatile public Mono<Void> dropCollection(String scopeName, String collectionName, DropCollectionOptions options)
scopeName - name of scope to drop collection fromcollectionName - name of collection to dropoptions - the custom options to apply.Mono completing when the operation is applied or failed with an error.com.couchbase.client.core.error.CollectionNotFoundException - (async) if the collection did not exist.com.couchbase.client.core.error.ScopeNotFoundException - (async) if the specified scope does not exist.com.couchbase.client.core.error.CouchbaseException - (async) if any other generic unhandled/unexpected errors.public Mono<Void> dropScope(String scopeName)
scopeName - the name of the scope to drop.Mono completing when the operation is applied or failed with an error.com.couchbase.client.core.error.ScopeNotFoundException - (async) if the scope did not exist.com.couchbase.client.core.error.CouchbaseException - (async) if any other generic unhandled/unexpected errors.public Mono<Void> dropScope(String scopeName, DropScopeOptions options)
scopeName - the name of the scope to drop.options - the custom options to apply.Mono completing when the operation is applied or failed with an error.com.couchbase.client.core.error.ScopeNotFoundException - (async) if the scope did not exist.com.couchbase.client.core.error.CouchbaseException - (async) if any other generic unhandled/unexpected errors.@Deprecated public Mono<ScopeSpec> getScope(String scopeName)
getAllScopes() instead.scopeName - the name of the scope.Mono containing information about the scope.com.couchbase.client.core.error.ScopeNotFoundException - (async) if scope does not exist.com.couchbase.client.core.error.CouchbaseException - (async) if any other generic unhandled/unexpected errors.@Deprecated public Mono<ScopeSpec> getScope(String scopeName, GetScopeOptions options)
getAllScopes(GetAllScopesOptions) instead.scopeName - the name of the scope.options - the custom options to apply.Mono containing information about the scope.com.couchbase.client.core.error.ScopeNotFoundException - (async) if scope does not exist.com.couchbase.client.core.error.CouchbaseException - (async) if any other generic unhandled/unexpected errors.public Flux<ScopeSpec> getAllScopes()
Flux with a (potentially empty) list of scopes in the bucket.com.couchbase.client.core.error.CouchbaseException - (async) if any other generic unhandled/unexpected errors.public Flux<ScopeSpec> getAllScopes(GetAllScopesOptions options)
options - the custom options to apply.Flux with a (potentially empty) list of scopes in the bucket.com.couchbase.client.core.error.CouchbaseException - (async) if any other generic unhandled/unexpected errors.Copyright © 2024 Couchbase, Inc.. All rights reserved.