Class ReactiveCollectionManager
- java.lang.Object
-
- com.couchbase.client.java.manager.collection.ReactiveCollectionManager
-
@Volatile public class ReactiveCollectionManager extends Object
TheReactiveCollectionManager
provides APIs to manage bucket collections and scopes.
-
-
Constructor Summary
Constructors Constructor Description ReactiveCollectionManager(AsyncCollectionManager async)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Mono<Void>
createCollection(CollectionSpec collectionSpec)
Creates a collection if it does not already exist.Mono<Void>
createCollection(CollectionSpec collectionSpec, CreateCollectionOptions options)
Creates a collection if it does not already exist.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.Mono<Void>
dropCollection(CollectionSpec collectionSpec)
Drops a collection if it exists.Mono<Void>
dropCollection(CollectionSpec collectionSpec, DropCollectionOptions options)
Drops a collection if it exists.Mono<Void>
dropScope(String scopeName)
Drops a scope if it exists.Mono<Void>
dropScope(String scopeName, DropScopeOptions options)
Drops a scope if it exists.Flux<ScopeSpec>
getAllScopes()
Returns all scopes in this bucket.Flux<ScopeSpec>
getAllScopes(GetAllScopesOptions options)
Returns all scopes in this bucket.Mono<ScopeSpec>
getScope(String scopeName)
Deprecated.usegetAllScopes()
instead.Mono<ScopeSpec>
getScope(String scopeName, GetScopeOptions options)
Deprecated.usegetAllScopes(GetAllScopesOptions)
instead.
-
-
-
Constructor Detail
-
ReactiveCollectionManager
public ReactiveCollectionManager(AsyncCollectionManager async)
-
-
Method Detail
-
createCollection
public Mono<Void> createCollection(CollectionSpec collectionSpec, CreateCollectionOptions options)
Creates a collection if it does not already exist.- Parameters:
collectionSpec
- the collection spec that contains the properties of the collection.- Throws:
CollectionExistsException
- (async) if the collection already existsScopeNotFoundException
- (async) if the specified scope does not exist.
-
dropCollection
public Mono<Void> dropCollection(CollectionSpec collectionSpec, DropCollectionOptions options)
Drops a collection if it exists.- Parameters:
collectionSpec
- the collection spec that contains the properties of the collection.- Throws:
CollectionNotFoundException
- (async) if the collection did not exist.ScopeNotFoundException
- (async) if the specified scope does not exist.
-
createScope
public Mono<Void> createScope(String scopeName, CreateScopeOptions options)
Creates a scope if it does not already exist.- Parameters:
scopeName
- the name of the scope to create.- Throws:
ScopeExistsException
- (async) if the scope already exists.
-
dropScope
public Mono<Void> dropScope(String scopeName, DropScopeOptions options)
Drops a scope if it exists.- Parameters:
scopeName
- the name of the scope to drop.- Throws:
ScopeNotFoundException
- (async) if the scope did not exist.
-
getScope
@Deprecated public Mono<ScopeSpec> getScope(String scopeName, GetScopeOptions options)
Deprecated.usegetAllScopes(GetAllScopesOptions)
instead.Returns the scope if it exists.- Parameters:
scopeName
- the name of the scope.- Returns:
- a mono containing information about the scope.
- Throws:
ScopeNotFoundException
- (async) if scope does not exist.
-
getAllScopes
public Flux<ScopeSpec> getAllScopes(GetAllScopesOptions options)
Returns all scopes in this bucket.- Returns:
- a flux of all scopes in this bucket.
-
createCollection
public Mono<Void> createCollection(CollectionSpec collectionSpec)
Creates a collection if it does not already exist.- Parameters:
collectionSpec
- the collection spec that contains the properties of the collection.- Throws:
CollectionExistsException
- (async) if the collection already existsScopeNotFoundException
- (async) if the specified scope does not exist.
-
dropCollection
public Mono<Void> dropCollection(CollectionSpec collectionSpec)
Drops a collection if it exists.- Parameters:
collectionSpec
- the collection spec that contains the properties of the collection.- Throws:
CollectionNotFoundException
- (async) if the collection did not exist.ScopeNotFoundException
- (async) if the specified scope does not exist.
-
createScope
public Mono<Void> createScope(String scopeName)
Creates a scope if it does not already exist.- Parameters:
scopeName
- the name of the scope to create.- Throws:
ScopeExistsException
- (async) if the scope already exists.
-
dropScope
public Mono<Void> dropScope(String scopeName)
Drops a scope if it exists.- Parameters:
scopeName
- the name of the scope to drop.- Throws:
ScopeNotFoundException
- (async) if the scope did not exist.
-
getScope
@Deprecated public Mono<ScopeSpec> getScope(String scopeName)
Deprecated.usegetAllScopes()
instead.Returns the scope if it exists.- Parameters:
scopeName
- the name of the scope.- Returns:
- a mono containing information about the scope.
- Throws:
ScopeNotFoundException
- (async) if scope does not exist.
-
-