public class DefaultCouchbaseBucketConfig extends AbstractBucketConfig implements CouchbaseBucketConfig
| Modifier and Type | Field and Description |
|---|---|
static int |
PARTITION_NOT_EXISTENT |
| Constructor and Description |
|---|
DefaultCouchbaseBucketConfig(long rev,
String name,
String uri,
String streamingUri,
CouchbasePartitionInfo partitionInfo,
List<NodeInfo> nodeInfos,
List<PortInfo> portInfos,
List<BucketCapabilities> bucketCapabilities)
Creates a new
CouchbaseBucketConfig. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
ephemeral()
If this couchbase bucket is ephemeral.
|
boolean |
hasFastForwardMap()
If this config instance contains a fast forward map.
|
boolean |
hasPrimaryPartitionsOnNode(NetworkAddress hostname)
Checks if the given hostname has active primary partitions assigned to it.
|
NodeInfo |
nodeAtIndex(int nodeIndex)
Returns information for the node at the given index.
|
short |
nodeIndexForMaster(int partition,
boolean useFastForward)
Returns the node index for the given partition index and master.
|
short |
nodeIndexForReplica(int partition,
int replica,
boolean useFastForward)
Returns the node index for the given partition index and the replica.
|
int |
numberOfPartitions()
Returns the total number of partitions.
|
int |
numberOfReplicas()
The number of configured replicas for this bucket.
|
long |
rev()
Revision number (optional) for that configuration.
|
boolean |
tainted()
If a config is marked as tainted.
|
String |
toString() |
BucketType |
type()
The bucket type.
|
locator, name, nodes, password, password, serviceEnabled, streamingUri, uri, username, usernameclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitlocator, name, nodes, password, password, serviceEnabled, streamingUri, uri, username, usernamepublic static final int PARTITION_NOT_EXISTENT
public DefaultCouchbaseBucketConfig(long rev,
String name,
String uri,
String streamingUri,
CouchbasePartitionInfo partitionInfo,
List<NodeInfo> nodeInfos,
List<PortInfo> portInfos,
List<BucketCapabilities> bucketCapabilities)
Creates a new CouchbaseBucketConfig.
rev - the revision of the config.name - the name of the bucket.uri - the URI for this bucket.streamingUri - the streaming URI for this bucket.partitionInfo - partition info for this bucket.nodeInfos - related node information.portInfos - port info for the nodes, including services.public int numberOfReplicas()
CouchbaseBucketConfigThe number of configured replicas for this bucket.
numberOfReplicas in interface CouchbaseBucketConfigpublic boolean tainted()
BucketConfigIf a config is marked as tainted.
tainted in interface BucketConfigpublic boolean hasPrimaryPartitionsOnNode(NetworkAddress hostname)
CouchbaseBucketConfigChecks if the given hostname has active primary partitions assigned to it.
hasPrimaryPartitionsOnNode in interface CouchbaseBucketConfighostname - the hostname of the node to check against.public short nodeIndexForMaster(int partition,
boolean useFastForward)
CouchbaseBucketConfigReturns the node index for the given partition index and master.
nodeIndexForMaster in interface CouchbaseBucketConfigpartition - the index of the partition.useFastForward - if the fast forward config should be used.public short nodeIndexForReplica(int partition,
int replica,
boolean useFastForward)
CouchbaseBucketConfigReturns the node index for the given partition index and the replica.
nodeIndexForReplica in interface CouchbaseBucketConfigpartition - the index of the partition.replica - the replica number.useFastForward - if the fast forward config should be used.public int numberOfPartitions()
CouchbaseBucketConfigReturns the total number of partitions.
numberOfPartitions in interface CouchbaseBucketConfigpublic NodeInfo nodeAtIndex(int nodeIndex)
CouchbaseBucketConfigReturns information for the node at the given index.
nodeAtIndex in interface CouchbaseBucketConfignodeIndex - the index of the node.public long rev()
BucketConfigRevision number (optional) for that configuration.
rev in interface BucketConfigpublic BucketType type()
BucketConfigThe bucket type.
type in interface BucketConfigpublic boolean hasFastForwardMap()
BucketConfigIf this config instance contains a fast forward map.
hasFastForwardMap in interface BucketConfigpublic boolean ephemeral()
CouchbaseBucketConfigIf this couchbase bucket is ephemeral.
ephemeral in interface CouchbaseBucketConfigCopyright © 2017 Couchbase, Inc.. All rights reserved.