Interface CouchbaseBucketConfig
- All Superinterfaces:
BucketConfig
- All Known Implementing Classes:
DefaultCouchbaseBucketConfig
A configuration representing the couchbase bucket.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanIf this couchbase bucket is ephemeral.booleanhasPrimaryPartitionsOnNode(String hostname) Checks if the given hostname has active primary partitions assigned to it.nodeAtIndex(int nodeIndex) Returns information for the node at the given index.intnodeIndexForMaster(int partition, boolean useFastForward) Returns the node index for the given partition index and master.intnodeIndexForReplica(int partition, int replica, boolean useFastForward) Returns the node index for the given partition index and the replica.intReturns the total number of partitions.intThe number of configured replicas for this bucket.Methods inherited from interface com.couchbase.client.dcp.core.config.BucketConfig
capabilities, hasFastForwardMap, locator, name, nodes, password, password, rev, serviceEnabled, streamingUri, tainted, type, uri, useAlternateNetwork, useAlternateNetwork, username, username, uuid
-
Method Details
-
nodeIndexForMaster
int nodeIndexForMaster(int partition, boolean useFastForward) Returns the node index for the given partition index and master.- Parameters:
partition- the index of the partition.useFastForward- if the fast forward config should be used.- Returns:
- the index of the node.
-
nodeIndexForReplica
int nodeIndexForReplica(int partition, int replica, boolean useFastForward) Returns the node index for the given partition index and the replica.- Parameters:
partition- the index of the partition.replica- the replica number.useFastForward- if the fast forward config should be used.- Returns:
- the index of the node.
-
numberOfPartitions
int numberOfPartitions()Returns the total number of partitions.- Returns:
- the number of partitions.
-
nodeAtIndex
Returns information for the node at the given index.- Parameters:
nodeIndex- the index of the node.- Returns:
- the information of the node at this index.
-
numberOfReplicas
int numberOfReplicas()The number of configured replicas for this bucket.- Returns:
- number of replicas.
-
hasPrimaryPartitionsOnNode
Checks if the given hostname has active primary partitions assigned to it.- Parameters:
hostname- the hostname of the node to check against.- Returns:
- true if it has, false otherwise.
-
ephemeral
boolean ephemeral()If this couchbase bucket is ephemeral.- Returns:
- true if it is, false otherwise.
-