@InterfaceStability.Committed @InterfaceAudience.Public public interface AsyncClusterManager
Cluster
.Modifier and Type | Method and Description |
---|---|
rx.Observable<AsyncClusterApiClient> |
apiClient() |
rx.Observable<BucketSettings> |
getBucket(String name)
Returns the
BucketSettings for the Bucket identified by name. |
rx.Observable<BucketSettings> |
getBuckets()
Returns
BucketSettings for all available Bucket s. |
rx.Observable<User> |
getUser(AuthDomain domain,
String username)
Get user info from Couchbase Server.
|
rx.Observable<User> |
getUsers(AuthDomain domain)
Get all users in Couchbase Server.
|
rx.Observable<Boolean> |
hasBucket(String name)
Checks if the cluster has a
Bucket identified by the given name. |
rx.Observable<ClusterInfo> |
info()
Provides information about the cluster.
|
rx.Observable<BucketSettings> |
insertBucket(BucketSettings settings)
Inserts a
Bucket with its BucketSettings if it does not already exist. |
rx.Observable<Boolean> |
removeBucket(String name)
Removes a
Bucket identified by its name. |
rx.Observable<Boolean> |
removeUser(AuthDomain domain,
String username)
Removes a user identified by user name.
|
rx.Observable<BucketSettings> |
updateBucket(BucketSettings settings)
Updates a
Bucket with its BucketSettings if it does already exist. |
rx.Observable<Boolean> |
upsertUser(AuthDomain domain,
String username,
UserSettings settings)
Creates/Updates a user with its
UserSettings . |
rx.Observable<ClusterInfo> info()
Observable
can error under the following conditions:
- com.couchbase.client.core.CouchbaseException: If the underlying resources could not be enabled properly.
- com.couchbase.client.java.error.TranscodingException: If the server response could not be decoded.ClusterInfo
object.rx.Observable<BucketSettings> getBuckets()
BucketSettings
for all available Bucket
s.
The Observable
can error under the following conditions:
- com.couchbase.client.core.CouchbaseException: If the underlying resources could not be enabled properly.
- com.couchbase.client.java.error.TranscodingException: If the server response could not be decoded.BucketSettings
.rx.Observable<BucketSettings> getBucket(String name)
BucketSettings
for the Bucket
identified by name.
The Observable
can error under the following conditions:
- com.couchbase.client.core.CouchbaseException: If the underlying resources could not be enabled properly.
- com.couchbase.client.java.error.TranscodingException: If the server response could not be decoded.name
- the name of the bucket.BucketSettings
if found or an empty observable if not found.rx.Observable<Boolean> hasBucket(String name)
Bucket
identified by the given name.
The Observable
can error under the following conditions:
- com.couchbase.client.core.CouchbaseException: If the underlying resources could not be enabled properly.
- com.couchbase.client.java.error.TranscodingException: If the server response could not be decoded.name
- the name of the bucket.rx.Observable<BucketSettings> insertBucket(BucketSettings settings)
Bucket
with its BucketSettings
if it does not already exist.
The Observable
can error under the following conditions:
- com.couchbase.client.core.CouchbaseException: If the underlying resources could not be enabled properly.
- com.couchbase.client.java.error.TranscodingException: If the server response could not be decoded.
- com.couchbase.client.java.error.BucketAlreadyExistsException: If the bucket already exists.
**Note:** Inserting a Bucket is an asynchronous operation on the server side, so even if the
response is returned there is no guarantee that the operation has finished on the server itself.settings
- the bucket settings that should be applied.rx.Observable<BucketSettings> updateBucket(BucketSettings settings)
Bucket
with its BucketSettings
if it does already exist.
The Observable
can error under the following conditions:
- com.couchbase.client.core.CouchbaseException: If the underlying resources could not be enabled properly.
- com.couchbase.client.java.error.TranscodingException: If the server response could not be decoded.
- com.couchbase.client.java.error.BucketDoesNotExistException: If the bucket does not exist.
**Note:** Updating a Bucket is an asynchronous operation on the server side, so even if the
response is returned there is no guarantee that the operation has finished on the server itself.settings
- the bucket settings that should be applied.rx.Observable<Boolean> removeBucket(String name)
Bucket
identified by its name.
The Observable
can error under the following conditions:
- com.couchbase.client.core.CouchbaseException: If the underlying resources could not be enabled properly.
- com.couchbase.client.java.error.TranscodingException: If the server response could not be decoded.
**Note:** Removing a Bucket is an asynchronous operation on the server side, so even if the
response is returned there is no guarantee that the operation has finished on the server itself.name
- the name of the bucket.@InterfaceStability.Experimental rx.Observable<Boolean> upsertUser(AuthDomain domain, String username, UserSettings settings)
UserSettings
.
The Observable
can error under the following conditions:
- com.couchbase.client.core.CouchbaseException: If the underlying resources could not be enabled properly.
**Note:** Updating a user is an asynchronous operation on the server side, so even if the
response is returned there is no guarantee that the operation has finished on the server itself.domain
- the authentication to use, most likely AuthDomain.LOCAL
username
- the user name of the user that should be updated.settings
- the user settings that should be applied.@InterfaceStability.Experimental rx.Observable<Boolean> removeUser(AuthDomain domain, String username)
Observable
can error under the following conditions:
- com.couchbase.client.core.CouchbaseException: If the underlying resources could not be enabled properly.
**Note:** Removing a user is an asynchronous operation on the server side, so even if the
response is returned there is no guarantee that the operation has finished on the server itself.domain
- the authentication to use, most likely AuthDomain.LOCAL
username
- the user name of the user that should be updated.@InterfaceStability.Experimental rx.Observable<User> getUsers(AuthDomain domain)
Observable
can error under the following conditions:
- com.couchbase.client.core.CouchbaseException: If the underlying resources could not be enabled properly.
- com.couchbase.client.java.error.TranscodingException: If the server response could not be decoded.domain
- the authentication to use, most likely AuthDomain.LOCAL
@InterfaceStability.Experimental rx.Observable<User> getUser(AuthDomain domain, String username)
Observable
can error under the following conditions:
- com.couchbase.client.core.CouchbaseException: If the underlying resources could not be enabled properly.
- com.couchbase.client.java.error.TranscodingException: If the server response could not be decoded.domain
- the authentication to use, most likely AuthDomain.LOCAL
@InterfaceStability.Experimental rx.Observable<AsyncClusterApiClient> apiClient()
Observable
emitting a single new AsyncClusterApiClient
to prepare and perform
REST API asynchronous requests on this cluster.Copyright © 2015 Couchbase, Inc.