public class CouchbaseBucket extends Bucket
Bucket.BucketTypecluster, configurationRwLock, name, numReplicas, numVBuckets, password, poolName, servers, vbInfo| Constructor and Description |
|---|
CouchbaseBucket(CouchbaseMock cluster,
BucketConfiguration config) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
getConfigMap()
Gets a map of the current bucket configuration which can be JSON-serialized
as a valid "Cluster configuration".
|
Bucket.BucketType |
getType()
Gets the type of the bucket
|
short |
getVbIndexForKey(String key)
Get the server index for a given key
|
ErrorCode |
storeItem(String key,
byte[] value)
Convenience method to store an item in a bucket
|
activeServers, configReadLock, configReadUnlock, create, failover, getAdminServer, getCAPIServer, getCluster, getCommonConfig, getJSON, getMasterItems, getName, getPassword, getServers, getUUID, getVBucketInfo, regenCoords, respawnpublic CouchbaseBucket(CouchbaseMock cluster, BucketConfiguration config) throws IOException
IOExceptionpublic short getVbIndexForKey(String key)
BucketgetVbIndexForKey in class Bucketkey - The key to look uppublic Map<String,Object> getConfigMap()
Bucket/pools/default/buckets/$bucket endpoint in a Couchbase cluster.getConfigMap in class BucketBucket.configReadLock()
before calling this method, and Bucket.configReadUnlock() after calling
this method.public Bucket.BucketType getType()
BucketCopyright © 2017. All rights reserved.