public class ClusterManager
extends net.spy.memcached.compat.SpyObject
Constructor and Description |
---|
ClusterManager(java.util.List<java.net.URI> uris,
java.lang.String username,
java.lang.String password)
Creates a connection to the Couchbase REST interface.
|
Modifier and Type | Method and Description |
---|---|
void |
createDefaultBucket(BucketType type,
int memorySizeMB,
int replicas,
boolean flushEnabled)
Creates the default bucket.
|
void |
createNamedBucket(BucketType type,
java.lang.String name,
int memorySizeMB,
int replicas,
java.lang.String authPassword,
boolean flushEnabled)
Creates a named bucket with a given password for SASL authentication.
|
void |
createPortBucket(BucketType type,
java.lang.String name,
int memorySizeMB,
int replicas,
int port,
boolean flush)
Creates the a sasl bucket.
|
void |
deleteBucket(java.lang.String name)
Deletes a bucket.
|
FlushResponse |
flushBucket(java.lang.String name)
Deletes all data in a bucket.
|
java.util.List<java.lang.String> |
listBuckets()
Lists all buckets in a Couchbase cluster.
|
boolean |
shutdown() |
void |
updateBucket(java.lang.String name,
int memorySizeMB,
AuthType authType,
int replicas,
int port,
java.lang.String authpassword,
boolean flushEnabled) |
public ClusterManager(java.util.List<java.net.URI> uris, java.lang.String username, java.lang.String password)
uris
- A list of servers in the cluster.username
- The cluster admin user name.password
- The cluster admin password.public void createDefaultBucket(BucketType type, int memorySizeMB, int replicas, boolean flushEnabled)
type
- The bucket type to create.memorySizeMB
- The amount of memory to allocate to this bucket.replicas
- The number of replicas for this bucket.flushEnabled
- If flush should be enabled on this bucket.public void createNamedBucket(BucketType type, java.lang.String name, int memorySizeMB, int replicas, java.lang.String authPassword, boolean flushEnabled)
type
- The bucket type to create.name
- The name of the bucket.memorySizeMB
- The amount of memory to allocate to this bucket.replicas
- The number of replicas for this bucket.authPassword
- The password for this bucket.flushEnabled
- If flush should be enabled on this bucket.public void createPortBucket(BucketType type, java.lang.String name, int memorySizeMB, int replicas, int port, boolean flush)
type
- The bucket type to create.name
- The name of the bucket.memorySizeMB
- The amount of memory to allocate to this bucket.replicas
- The number of replicas for this bucket.port
- The port for this bucket to listen on.public void deleteBucket(java.lang.String name)
name
- The name of the bucket to delete.public java.util.List<java.lang.String> listBuckets()
public FlushResponse flushBucket(java.lang.String name)
name
- The bucket to flush.public void updateBucket(java.lang.String name, int memorySizeMB, AuthType authType, int replicas, int port, java.lang.String authpassword, boolean flushEnabled)
public boolean shutdown()
Copyright © 2006-2009 Dustin Sallings, 2009-2012 Couchbase, Inc.