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 Modifier and Type Method Description Mono<Boolean>
collectionExists(CollectionSpec collectionSpec)
Checks if the given collection exists in this bucket.Mono<Void>
createCollection(CollectionSpec collectionSpec)
Creates a collection if it does not already exist.Mono<Void>
createScope(ScopeSpec scopeSpec)
Creates a scope if it does not already exist.Mono<Void>
dropCollection(CollectionSpec collectionSpec)
Drops a collection if it exists.Mono<Void>
dropScope(String scopeName)
Drops a scope if it exists.Flux<ScopeSpec>
getAllScopes()
Returns all scopes in this bucket.Mono<ScopeSpec>
getScope(String scopeName)
Returns the scope if it exists.
-
-
-
Constructor Detail
-
ReactiveCollectionManager
public ReactiveCollectionManager(AsyncCollectionManager async)
-
-
Method Detail
-
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.
-
collectionExists
public Mono<Boolean> collectionExists(CollectionSpec collectionSpec)
Checks if the given collection exists in this bucket.- Parameters:
collectionSpec
- the collection spec that contains the properties of the collection.- Returns:
- true if it exists, false otherwise.
-
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.
-
createScope
public Mono<Void> createScope(ScopeSpec scopeSpec)
Creates a scope if it does not already exist.- Parameters:
scopeSpec
- the scope spec that contains the properties of the scope.
-
dropScope
public Mono<Void> dropScope(String scopeName)
Drops a scope if it exists.- Parameters:
scopeName
- the name of the scope to drop.
-
getScope
public Mono<ScopeSpec> getScope(String scopeName)
Returns the scope if it exists.- Parameters:
scopeName
- the name of the scope.- Returns:
- a mono containing the
ScopeSpec
or an exception if it does not exist.
-
-