@Stability.Volatile public class AsyncCollectionManager extends ManagerSupport
AsyncCollectionManager provides APIs to manage bucket collections and scopes.| Constructor and Description |
|---|
AsyncCollectionManager(Core core,
String bucketName) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
createCollection(CollectionSpec collectionSpec)
Creates a collection if it does not already exist.
|
CompletableFuture<Void> |
createCollection(CollectionSpec collectionSpec,
CreateCollectionOptions options)
Creates a collection if it does not already exist.
|
CompletableFuture<Void> |
createScope(String scopeName)
Creates a scope if it does not already exist.
|
CompletableFuture<Void> |
createScope(String scopeName,
CreateScopeOptions options)
Creates a scope if it does not already exist.
|
CompletableFuture<Void> |
dropCollection(CollectionSpec collectionSpec)
Drops a collection if it exists.
|
CompletableFuture<Void> |
dropCollection(CollectionSpec collectionSpec,
DropCollectionOptions options)
Drops a collection if it exists.
|
CompletableFuture<Void> |
dropScope(String scopeName)
Drops a scope if it exists.
|
CompletableFuture<Void> |
dropScope(String scopeName,
DropScopeOptions options)
Drops a scope if it exists.
|
CompletableFuture<List<ScopeSpec>> |
getAllScopes()
Returns all scopes in this bucket.
|
CompletableFuture<List<ScopeSpec>> |
getAllScopes(GetAllScopesOptions options)
Returns all scopes in this bucket.
|
CompletableFuture<ScopeSpec> |
getScope(String scopeName)
Returns the scope if it exists.
|
CompletableFuture<ScopeSpec> |
getScope(String scopeName,
GetScopeOptions options)
Returns the scope if it exists.
|
checkStatus, sendRequest, sendRequest, sendRequest, sendRequest, sendRequestpublic CompletableFuture<Void> createCollection(CollectionSpec collectionSpec)
collectionSpec - the collection spec that contains the properties of the collection.CompletableFuture once the collection creation completed.CollectionExistsException - (async) if the collection already existsScopeNotFoundException - (async) if the specified scope does not exist.public CompletableFuture<Void> createCollection(CollectionSpec collectionSpec, CreateCollectionOptions options)
collectionSpec - the collection spec that contains the properties of the collection.CompletableFuture once the collection creation completed.CollectionExistsException - (async) if the collection already existsScopeNotFoundException - (async) if the specified scope does not exist.public CompletableFuture<Void> createScope(String scopeName)
scopeName - the name of the scope to create.CompletableFuture once the scope creation completed.ScopeExistsException - (async) if the scope already exists.public CompletableFuture<Void> createScope(String scopeName, CreateScopeOptions options)
scopeName - the name of the scope to create.CompletableFuture once the scope creation completed.ScopeExistsException - (async) if the scope already exists.public CompletableFuture<Void> dropCollection(CollectionSpec collectionSpec)
collectionSpec - the collection spec that contains the properties of the collection.CompletableFuture once the collection is dropped.CollectionNotFoundException - (async) if the collection did not exist.ScopeNotFoundException - (async) if the specified scope does not exist.public CompletableFuture<Void> dropCollection(CollectionSpec collectionSpec, DropCollectionOptions options)
collectionSpec - the collection spec that contains the properties of the collection.CompletableFuture once the collection is dropped.CollectionNotFoundException - (async) if the collection did not exist.ScopeNotFoundException - (async) if the specified scope does not exist.public CompletableFuture<Void> dropScope(String scopeName)
scopeName - the name of the scope to drop.CompletableFuture once the scope is dropped.ScopeNotFoundException - (async) if the scope did not exist.public CompletableFuture<Void> dropScope(String scopeName, DropScopeOptions options)
scopeName - the name of the scope to drop.CompletableFuture once the scope is dropped.ScopeNotFoundException - (async) if the scope did not exist.public CompletableFuture<ScopeSpec> getScope(String scopeName)
scopeName - the name of the scope.CompletableFuture containing information about the scope.ScopeNotFoundException - (async) if scope does not exist.public CompletableFuture<ScopeSpec> getScope(String scopeName, GetScopeOptions options)
scopeName - the name of the scope.CompletableFuture containing information about the scope.ScopeNotFoundException - (async) if scope does not exist.public CompletableFuture<List<ScopeSpec>> getAllScopes()
CompletableFuture with a list of scopes in the bucket.public CompletableFuture<List<ScopeSpec>> getAllScopes(GetAllScopesOptions options)
CompletableFuture with a list of scopes in the bucket.Copyright © 2020 Couchbase, Inc.. All rights reserved.