Package com.couchbase.client.core.config
Class CouchbaseBucketConfig
java.lang.Object
com.couchbase.client.core.config.AbstractBucketConfig
com.couchbase.client.core.config.CouchbaseBucketConfig
- All Implemented Interfaces:
BucketConfig
public class CouchbaseBucketConfig extends AbstractBucketConfig
-
Field Summary
Fields Modifier and Type Field Description static intPARTITION_NOT_EXISTENT -
Constructor Summary
Constructors Constructor Description CouchbaseBucketConfig(long rev, String uuid, String name, String uri, String streamingUri, PartitionInfo partitionInfo, List<NodeInfo> nodeInfos, List<PortInfo> portInfos, List<BucketCapabilities> bucketCapabilities, Map<String,Set<ClusterCapabilities>> clusterCapabilities, String origin)Creates a newCouchbaseBucketConfig. -
Method Summary
Modifier and Type Method Description booleanephemeral()booleanhasFastForwardMap()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.booleanhasPrimaryPartitionsOnNode(String hostname)NodeInfonodeAtIndex(int nodeIndex)shortnodeIndexForActive(int partition, boolean useFastForward)shortnodeIndexForReplica(int partition, int replica, boolean useFastForward)intnumberOfPartitions()intnumberOfReplicas()longrev()Revision number (optional) for that configuration.booleantainted()Returns true if the config indicates the cluster is undergoing a transition (such as a rebalance operation).StringtoString()BucketTypetype()The bucket type.Methods inherited from class com.couchbase.client.core.config.AbstractBucketConfig
bucketCapabilities, clusterCapabilities, locator, name, nodes, serviceEnabled, streamingUri, uri, uuid
-
Field Details
-
PARTITION_NOT_EXISTENT
public static final int PARTITION_NOT_EXISTENT- See Also:
- Constant Field Values
-
-
Constructor Details
-
CouchbaseBucketConfig
public CouchbaseBucketConfig(long rev, String uuid, String name, String uri, String streamingUri, PartitionInfo partitionInfo, List<NodeInfo> nodeInfos, List<PortInfo> portInfos, List<BucketCapabilities> bucketCapabilities, Map<String,Set<ClusterCapabilities>> clusterCapabilities, String origin)Creates a newCouchbaseBucketConfig.- Parameters:
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.
-
-
Method Details
-
numberOfReplicas
public int numberOfReplicas() -
tainted
public boolean tainted()Description copied from interface:BucketConfigReturns true if the config indicates the cluster is undergoing a transition (such as a rebalance operation).- Returns:
- true if a transition is in progress.
-
hasPrimaryPartitionsOnNode
-
nodeIndexForActive
public short nodeIndexForActive(int partition, boolean useFastForward) -
nodeIndexForReplica
public short nodeIndexForReplica(int partition, int replica, boolean useFastForward) -
numberOfPartitions
public int numberOfPartitions() -
nodeAtIndex
-
rev
public long rev()Description copied from interface:BucketConfigRevision number (optional) for that configuration.- Returns:
- the rev number, might be 0.
-
type
Description copied from interface:BucketConfigThe bucket type.- Returns:
- the bucket type.
-
hasFastForwardMap
public boolean hasFastForwardMap()Description copied from interface:BucketConfigReturns 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.- Returns:
- true if it does, false otherwise.
-
ephemeral
public boolean ephemeral() -
toString
-