Class ReactiveCollectionManager
java.lang.Object
com.couchbase.client.java.manager.collection.ReactiveCollectionManager
The 
ReactiveCollectionManager provides APIs to manage collections and scopes within a bucket.- 
Constructor SummaryConstructorsConstructorDescriptionReactiveCollectionManager(ReactorOps reactor, AsyncCollectionManager async) Creates a newReactiveCollectionManager.
- 
Method SummaryModifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void> createCollection(CollectionSpec collectionSpec) Deprecated.This method cannot be used to set the collection's "history" property.reactor.core.publisher.Mono<Void> createCollection(CollectionSpec collectionSpec, CreateCollectionOptions options) Deprecated.This method cannot be used to set the collection's "history" property.reactor.core.publisher.Mono<Void> createCollection(String scopeName, String collectionName, CreateCollectionSettings settings) Creates a collection if it does not already exist with custom options.reactor.core.publisher.Mono<Void> createCollection(String scopeName, String collectionName, CreateCollectionSettings settings, CreateCollectionOptions options) Creates a collection if it does not already exist with custom options.reactor.core.publisher.Mono<Void> createScope(String scopeName) Creates a scope if it does not already exist.reactor.core.publisher.Mono<Void> createScope(String scopeName, CreateScopeOptions options) Creates a scope if it does not already exist with custom options.reactor.core.publisher.Mono<Void> dropCollection(CollectionSpec collectionSpec) Deprecated.Please usedropCollection(String, String)instead.reactor.core.publisher.Mono<Void> dropCollection(CollectionSpec collectionSpec, DropCollectionOptions options) Deprecated.Please usedropCollection(String, String, DropCollectionOptions)instead.reactor.core.publisher.Mono<Void> dropCollection(String scopeName, String collectionName) Drops a collection if it exists.reactor.core.publisher.Mono<Void> dropCollection(String scopeName, String collectionName, DropCollectionOptions options) Drops a collection if it exists with custom options.reactor.core.publisher.Mono<Void> Drops a scope if it exists.reactor.core.publisher.Mono<Void> dropScope(String scopeName, DropScopeOptions options) Drops a scope if it exists with custom options.reactor.core.publisher.Flux<ScopeSpec> Returns all scopes in this bucket.reactor.core.publisher.Flux<ScopeSpec> getAllScopes(GetAllScopesOptions options) Returns all scopes in this bucket with custom options.reactor.core.publisher.Mono<ScopeSpec> Deprecated.usegetAllScopes()instead.reactor.core.publisher.Mono<ScopeSpec> getScope(String scopeName, GetScopeOptions options) Deprecated.usegetAllScopes(GetAllScopesOptions)instead.reactor.core.publisher.Mono<Void> updateCollection(String scopeName, String collectionName, UpdateCollectionSettings settings) Updates a collection with custom options.reactor.core.publisher.Mono<Void> updateCollection(String scopeName, String collectionName, UpdateCollectionSettings settings, UpdateCollectionOptions options) Updates a collection with custom options.
- 
Constructor Details- 
ReactiveCollectionManagerCreates a newReactiveCollectionManager.This API is not intended to be called by the user directly, use ReactiveBucket.collections()instead.- Parameters:
- async- the underlying async collection manager.
 
 
- 
- 
Method Details- 
createCollection@Deprecated public reactor.core.publisher.Mono<Void> createCollection(CollectionSpec collectionSpec) Deprecated.This method cannot be used to set the collection's "history" property. This method is not compatible with Couchbase Server Community Edition. Please usecreateCollection(String, String, CreateCollectionSettings)instead.Creates a collection if it does not already exist.Note that a scope needs to be created first (via createScope(String)) if it doesn't exist already.- Parameters:
- collectionSpec- the collection spec that contains the properties of the collection.
- Returns:
- a Monocompleting when the operation is applied or failed with an error.
- Throws:
- CollectionExistsException- (async) if the collection already exists
- ScopeNotFoundException- (async) if the specified scope does not exist.
- CouchbaseException- (async) if any other generic unhandled/unexpected errors.
 
- 
createCollection@Deprecated public reactor.core.publisher.Mono<Void> createCollection(CollectionSpec collectionSpec, CreateCollectionOptions options) Deprecated.This method cannot be used to set the collection's "history" property. This method is not compatible with Couchbase Server Community Edition. Please usecreateCollection(String, String, CreateCollectionSettings, CreateCollectionOptions)instead.Creates a collection if it does not already exist with custom options.Note that a scope needs to be created first (via createScope(String)) if it doesn't exist already.- Parameters:
- collectionSpec- the collection spec that contains the properties of the collection.
- options- the custom options to apply.
- Returns:
- a Monocompleting when the operation is applied or failed with an error.
- Throws:
- CollectionExistsException- (async) if the collection already exists
- ScopeNotFoundException- (async) if the specified scope does not exist.
- CouchbaseException- (async) if any other generic unhandled/unexpected errors.
 
- 
createCollection@Volatile public reactor.core.publisher.Mono<Void> createCollection(String scopeName, String collectionName, CreateCollectionSettings settings) Creates a collection if it does not already exist with custom options.Note that a scope needs to be created first (via createScope(String)) if it doesn't exist already.- Parameters:
- scopeName- name of scope to create collection in
- collectionName- name of collection to create
- settings- the collection settings
- Returns:
- a Monocompleting when the operation is applied or failed with an error.
- Throws:
- CollectionExistsException- (async) if the collection already exists
- ScopeNotFoundException- (async) if the specified scope does not exist.
- CouchbaseException- (async) if any other generic unhandled/unexpected errors.
 
- 
createCollection@Volatile public reactor.core.publisher.Mono<Void> createCollection(String scopeName, String collectionName, CreateCollectionSettings settings, CreateCollectionOptions options) Creates a collection if it does not already exist with custom options.Note that a scope needs to be created first (via createScope(String)) if it doesn't exist already.- Parameters:
- scopeName- name of scope to create collection in
- collectionName- name of collection to create
- settings- the collection settings
- options- the custom options to apply.
- Returns:
- a Monocompleting when the operation is applied or failed with an error.
- Throws:
- CollectionExistsException- (async) if the collection already exists.
- ScopeNotFoundException- (async) if the specified scope does not exist.
- CouchbaseException- (async) if any other generic unhandled/unexpected errors.
 
- 
createScopeCreates a scope if it does not already exist.- Parameters:
- scopeName- the name of the scope to create.
- Returns:
- a Monocompleting when the operation is applied or failed with an error.
- Throws:
- ScopeExistsException- (async) if the scope already exists.
- CouchbaseException- (async) if any other generic unhandled/unexpected errors.
 
- 
createScopeCreates a scope if it does not already exist with custom options.- Parameters:
- scopeName- the name of the scope to create.
- options- the custom options to apply.
- Returns:
- a Monocompleting when the operation is applied or failed with an error.
- Throws:
- ScopeExistsException- (async) if the scope already exists.
- CouchbaseException- (async) if any other generic unhandled/unexpected errors.
 
- 
updateCollection@Volatile public reactor.core.publisher.Mono<Void> updateCollection(String scopeName, String collectionName, UpdateCollectionSettings settings) Updates a collection with custom options.- Parameters:
- scopeName- name of scope to update collection in
- collectionName- name of collection to update
- settings- the collection settings
- Returns:
- a CompletableFuturecompleting when the operation is applied or failed with an error.
- Throws:
- CollectionNotFoundException- (async) if the specified collection does not exist.
- ScopeNotFoundException- (async) if the specified scope does not exist.
- CouchbaseException- (async) if any other generic unhandled/unexpected errors.
 
- 
updateCollection@Volatile public reactor.core.publisher.Mono<Void> updateCollection(String scopeName, String collectionName, UpdateCollectionSettings settings, UpdateCollectionOptions options) Updates a collection with custom options.- Parameters:
- scopeName- name of scope to update collection in
- collectionName- name of collection to update
- settings- the collection settings
- options- the custom options to apply.
- Returns:
- a CompletableFuturecompleting when the operation is applied or failed with an error.
- Throws:
- CollectionNotFoundException- (async) if the specified collection does not exist.
- ScopeNotFoundException- (async) if the specified scope does not exist.
- CouchbaseException- (async) if any other generic unhandled/unexpected errors.
 
- 
dropCollectionDeprecated.Please usedropCollection(String, String)instead.Drops a collection if it exists.- Parameters:
- collectionSpec- the collection spec that contains the properties of the collection.
- Returns:
- a Monocompleting when the operation is applied or failed with an error.
- Throws:
- CollectionNotFoundException- (async) if the collection did not exist.
- ScopeNotFoundException- (async) if the specified scope does not exist.
- CouchbaseException- (async) if any other generic unhandled/unexpected errors.
 
- 
dropCollection@Deprecated public reactor.core.publisher.Mono<Void> dropCollection(CollectionSpec collectionSpec, DropCollectionOptions options) Deprecated.Please usedropCollection(String, String, DropCollectionOptions)instead.Drops a collection if it exists with custom options.- Parameters:
- collectionSpec- the collection spec that contains the properties of the collection.
- options- the custom options to apply.
- Returns:
- a Monocompleting when the operation is applied or failed with an error.
- Throws:
- CollectionNotFoundException- (async) if the collection did not exist.
- ScopeNotFoundException- (async) if the specified scope does not exist.
- CouchbaseException- (async) if any other generic unhandled/unexpected errors.
 
- 
dropCollection@Volatile public reactor.core.publisher.Mono<Void> dropCollection(String scopeName, String collectionName) Drops a collection if it exists.- Parameters:
- scopeName- name of scope to drop collection from
- collectionName- name of collection to drop
- Returns:
- a Monocompleting when the operation is applied or failed with an error.
- Throws:
- CollectionNotFoundException- (async) if the collection did not exist.
- ScopeNotFoundException- (async) if the specified scope does not exist.
- CouchbaseException- (async) if any other generic unhandled/unexpected errors.
 
- 
dropCollection@Volatile public reactor.core.publisher.Mono<Void> dropCollection(String scopeName, String collectionName, DropCollectionOptions options) Drops a collection if it exists with custom options.- Parameters:
- scopeName- name of scope to drop collection from
- collectionName- name of collection to drop
- options- the custom options to apply.
- Returns:
- a Monocompleting when the operation is applied or failed with an error.
- Throws:
- CollectionNotFoundException- (async) if the collection did not exist.
- ScopeNotFoundException- (async) if the specified scope does not exist.
- CouchbaseException- (async) if any other generic unhandled/unexpected errors.
 
- 
dropScopeDrops a scope if it exists.- Parameters:
- scopeName- the name of the scope to drop.
- Returns:
- a Monocompleting when the operation is applied or failed with an error.
- Throws:
- ScopeNotFoundException- (async) if the scope did not exist.
- CouchbaseException- (async) if any other generic unhandled/unexpected errors.
 
- 
dropScopeDrops a scope if it exists with custom options.- Parameters:
- scopeName- the name of the scope to drop.
- options- the custom options to apply.
- Returns:
- a Monocompleting when the operation is applied or failed with an error.
- Throws:
- ScopeNotFoundException- (async) if the scope did not exist.
- CouchbaseException- (async) if any other generic unhandled/unexpected errors.
 
- 
getScopeDeprecated.usegetAllScopes()instead.Returns the scope if it exists.- Parameters:
- scopeName- the name of the scope.
- Returns:
- a Monocontaining information about the scope.
- Throws:
- ScopeNotFoundException- (async) if scope does not exist.
- CouchbaseException- (async) if any other generic unhandled/unexpected errors.
 
- 
getScope@Deprecated public reactor.core.publisher.Mono<ScopeSpec> getScope(String scopeName, GetScopeOptions options) Deprecated.usegetAllScopes(GetAllScopesOptions)instead.Returns the scope if it exists with custom options.- Parameters:
- scopeName- the name of the scope.
- options- the custom options to apply.
- Returns:
- a Monocontaining information about the scope.
- Throws:
- ScopeNotFoundException- (async) if scope does not exist.
- CouchbaseException- (async) if any other generic unhandled/unexpected errors.
 
- 
getAllScopesReturns all scopes in this bucket.- Returns:
- a Fluxwith a (potentially empty) list of scopes in the bucket.
- Throws:
- CouchbaseException- (async) if any other generic unhandled/unexpected errors.
 
- 
getAllScopesReturns all scopes in this bucket with custom options.- Parameters:
- options- the custom options to apply.
- Returns:
- a Fluxwith a (potentially empty) list of scopes in the bucket.
- Throws:
- CouchbaseException- (async) if any other generic unhandled/unexpected errors.
 
 
-