Package com.couchbase.client.core.config
Class DefaultMemcachedBucketConfig
- java.lang.Object
-
- com.couchbase.client.core.config.AbstractBucketConfig
-
- com.couchbase.client.core.config.DefaultMemcachedBucketConfig
-
- All Implemented Interfaces:
BucketConfig
,MemcachedBucketConfig
public class DefaultMemcachedBucketConfig extends AbstractBucketConfig implements MemcachedBucketConfig
-
-
Constructor Summary
Constructors Constructor Description DefaultMemcachedBucketConfig(ConfigParserEnvironment env, long rev, String uuid, String name, String uri, String streamingUri, List<NodeInfo> nodeInfos, List<PortInfo> portInfos, List<BucketCapabilities> bucketCapabilities, String origin)
Creates a newMemcachedBucketConfig
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.SortedMap<Long,NodeInfo>
ketamaNodes()
String
nodeForId(byte[] id)
Returns the target node address for the given document id.long
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.-
Methods inherited from class com.couchbase.client.core.config.AbstractBucketConfig
capabilities, locator, name, nodes, password, password, serviceEnabled, streamingUri, uri, useAlternateNetwork, useAlternateNetwork, username, username, uuid
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.couchbase.client.core.config.BucketConfig
capabilities, locator, name, nodes, password, password, serviceEnabled, streamingUri, uri, useAlternateNetwork, useAlternateNetwork, username, username, uuid
-
-
-
-
Constructor Detail
-
DefaultMemcachedBucketConfig
public DefaultMemcachedBucketConfig(ConfigParserEnvironment env, long rev, String uuid, String name, String uri, String streamingUri, List<NodeInfo> nodeInfos, List<PortInfo> portInfos, List<BucketCapabilities> bucketCapabilities, String origin)
Creates a newMemcachedBucketConfig
.- Parameters:
env
- the bootstrap part of environment object.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.nodeInfos
- related node information.portInfos
- port info for the nodes, including services.
-
-
Method Detail
-
tainted
public boolean tainted()
Description copied from interface:BucketConfig
Returns true if the config indicates the cluster is undergoing a transition (such as a rebalance operation).- Specified by:
tainted
in interfaceBucketConfig
- Returns:
- true if a transition is in progress.
-
rev
public long rev()
Description copied from interface:BucketConfig
Revision number (optional) for that configuration.- Specified by:
rev
in interfaceBucketConfig
- Returns:
- the rev number, might be 0.
-
type
public BucketType type()
Description copied from interface:BucketConfig
The bucket type.- Specified by:
type
in interfaceBucketConfig
- Returns:
- the bucket type.
-
ketamaNodes
public SortedMap<Long,NodeInfo> ketamaNodes()
- Specified by:
ketamaNodes
in interfaceMemcachedBucketConfig
-
nodeForId
public String nodeForId(byte[] id)
Description copied from interface:MemcachedBucketConfig
Returns the target node address for the given document id.- Specified by:
nodeForId
in interfaceMemcachedBucketConfig
- Parameters:
id
- the id for the document.- Returns:
- the node address for the given document id.
-
hasFastForwardMap
public boolean hasFastForwardMap()
Description copied from interface:BucketConfig
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.- Specified by:
hasFastForwardMap
in interfaceBucketConfig
- Returns:
- true if it does, false otherwise.
-
-