public class DefaultCouchbaseBucketConfig extends AbstractBucketConfig implements CouchbaseBucketConfig
| Modifier and Type | Field and Description |
|---|---|
static int |
PARTITION_NOT_EXISTENT |
| Constructor and Description |
|---|
DefaultCouchbaseBucketConfig(long rev,
long revEpoch,
String uuid,
String name,
String uri,
String streamingUri,
CouchbasePartitionInfo partitionInfo,
List<NodeInfo> nodeInfos,
List<PortInfo> portInfos,
List<BucketCapabilities> bucketCapabilities,
String origin)
Creates a new
CouchbaseBucketConfig. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
ephemeral()
If this couchbase bucket is ephemeral.
|
boolean |
hasFastForwardMap()
Returns true if the config has a fast forward map that describes what the
topology of the cluster will be after the current rebalance operation completes.
|
boolean |
hasPrimaryPartitionsOnNode(String 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.
|
int |
nodeIndexForMaster(int partition,
boolean useFastForward)
Returns the node index for the given partition index and master.
|
int |
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.
|
BucketConfigRevision |
rev()
Revision number (optional) for that configuration.
|
boolean |
tainted()
Returns true if the config indicates the cluster is undergoing
a transition (such as a rebalance operation).
|
String |
toString() |
BucketType |
type()
The bucket type.
|
capabilities, locator, name, nodes, password, password, serviceEnabled, streamingUri, uri, useAlternateNetwork, useAlternateNetwork, username, username, uuidclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcapabilities, locator, name, nodes, password, password, serviceEnabled, streamingUri, uri, useAlternateNetwork, useAlternateNetwork, username, username, uuidpublic static final int PARTITION_NOT_EXISTENT
public DefaultCouchbaseBucketConfig(long rev,
long revEpoch,
String uuid,
String name,
String uri,
String streamingUri,
CouchbasePartitionInfo partitionInfo,
List<NodeInfo> nodeInfos,
List<PortInfo> portInfos,
List<BucketCapabilities> bucketCapabilities,
String origin)
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()
CouchbaseBucketConfignumberOfReplicas in interface CouchbaseBucketConfigpublic boolean tainted()
BucketConfigtainted in interface BucketConfigpublic boolean hasPrimaryPartitionsOnNode(String hostname)
CouchbaseBucketConfighasPrimaryPartitionsOnNode in interface CouchbaseBucketConfighostname - the hostname of the node to check against.public int nodeIndexForMaster(int partition,
boolean useFastForward)
CouchbaseBucketConfignodeIndexForMaster in interface CouchbaseBucketConfigpartition - the index of the partition.useFastForward - if the fast forward config should be used.public int nodeIndexForReplica(int partition,
int replica,
boolean useFastForward)
CouchbaseBucketConfignodeIndexForReplica in interface CouchbaseBucketConfigpartition - the index of the partition.replica - the replica number.useFastForward - if the fast forward config should be used.public int numberOfPartitions()
CouchbaseBucketConfignumberOfPartitions in interface CouchbaseBucketConfigpublic NodeInfo nodeAtIndex(int nodeIndex)
CouchbaseBucketConfignodeAtIndex in interface CouchbaseBucketConfignodeIndex - the index of the node.public BucketConfigRevision rev()
BucketConfigrev in interface BucketConfigpublic BucketType type()
BucketConfigtype in interface BucketConfigpublic boolean hasFastForwardMap()
BucketConfighasFastForwardMap in interface BucketConfigpublic boolean ephemeral()
CouchbaseBucketConfigephemeral in interface CouchbaseBucketConfigCopyright © 2021 Couchbase, Inc.. All rights reserved.