Package com.couchbase.client.core.config
Interface CouchbaseBucketConfig
-
- All Superinterfaces:
BucketConfig
- All Known Implementing Classes:
DefaultCouchbaseBucketConfig
public interface CouchbaseBucketConfig extends BucketConfig
A configuration representing the couchbase bucket.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
ephemeral()
If this couchbase bucket is ephemeral.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.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.-
Methods inherited from interface com.couchbase.client.core.config.BucketConfig
capabilities, hasFastForwardMap, locator, name, nodes, password, password, rev, serviceEnabled, streamingUri, tainted, type, uri, useAlternateNetwork, useAlternateNetwork, username, username, uuid
-
-
-
-
Method Detail
-
nodeIndexForMaster
short 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
short 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
NodeInfo nodeAtIndex(int nodeIndex)
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
boolean hasPrimaryPartitionsOnNode(String hostname)
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.
-
-