Package com.couchbase.client.core.config
Class AbstractBucketConfig
- java.lang.Object
-
- com.couchbase.client.core.config.AbstractBucketConfig
-
- All Implemented Interfaces:
BucketConfig
- Direct Known Subclasses:
CouchbaseBucketConfig
,MemcachedBucketConfig
public abstract class AbstractBucketConfig extends Object implements BucketConfig
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractBucketConfig(String uuid, String name, BucketNodeLocator locator, String uri, String streamingUri, List<NodeInfo> nodeInfos, List<PortInfo> portInfos, List<BucketCapabilities> bucketCapabilities, String origin, Map<String,Set<ClusterCapabilities>> clusterCapabilities)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<BucketCapabilities>
bucketCapabilities()
Returns all the capabilities that are enabled and recognized on this bucket.Map<ServiceType,Set<ClusterCapabilities>>
clusterCapabilities()
Returns the cluster capabilities reported by the server.BucketNodeLocator
locator()
The type of node locator in use for this bucket.String
name()
The name of the bucket.List<NodeInfo>
nodes()
The list of nodes associated with this bucket.boolean
serviceEnabled(ServiceType type)
Check if the service is enabled on the bucket.String
streamingUri()
The HTTP Streaming URI for this bucket.String
uri()
The HTTP Uri for this bucket configuration.String
uuid()
Returns the UUID of the bucket, ornull
if the bucket does not have a UUID.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.couchbase.client.core.config.BucketConfig
hasFastForwardMap, rev, tainted, type
-
-
-
-
Constructor Detail
-
AbstractBucketConfig
protected AbstractBucketConfig(String uuid, String name, BucketNodeLocator locator, String uri, String streamingUri, List<NodeInfo> nodeInfos, List<PortInfo> portInfos, List<BucketCapabilities> bucketCapabilities, String origin, Map<String,Set<ClusterCapabilities>> clusterCapabilities)
-
-
Method Detail
-
uuid
public String uuid()
Description copied from interface:BucketConfig
Returns the UUID of the bucket, ornull
if the bucket does not have a UUID.The UUID is an opaque value assigned when the bucket is created. If the bucket is deleted and a new bucket is created with the same name, the new bucket will have a different UUID.
- Specified by:
uuid
in interfaceBucketConfig
- Returns:
- bucket UUID, or
null
.
-
name
public String name()
Description copied from interface:BucketConfig
The name of the bucket.- Specified by:
name
in interfaceBucketConfig
- Returns:
- name of the bucket.
-
locator
public BucketNodeLocator locator()
Description copied from interface:BucketConfig
The type of node locator in use for this bucket.- Specified by:
locator
in interfaceBucketConfig
- Returns:
- the node locator type.
-
uri
public String uri()
Description copied from interface:BucketConfig
The HTTP Uri for this bucket configuration.- Specified by:
uri
in interfaceBucketConfig
- Returns:
- the uri.
-
streamingUri
public String streamingUri()
Description copied from interface:BucketConfig
The HTTP Streaming URI for this bucket.- Specified by:
streamingUri
in interfaceBucketConfig
- Returns:
- the streaming uri.
-
nodes
public List<NodeInfo> nodes()
Description copied from interface:BucketConfig
The list of nodes associated with this bucket.- Specified by:
nodes
in interfaceBucketConfig
- Returns:
- the list of nodes.
-
serviceEnabled
public boolean serviceEnabled(ServiceType type)
Description copied from interface:BucketConfig
Check if the service is enabled on the bucket.- Specified by:
serviceEnabled
in interfaceBucketConfig
- Parameters:
type
- the type to check.- Returns:
- true if it is, false otherwise.
-
clusterCapabilities
public Map<ServiceType,Set<ClusterCapabilities>> clusterCapabilities()
Description copied from interface:BucketConfig
Returns the cluster capabilities reported by the server.- Specified by:
clusterCapabilities
in interfaceBucketConfig
-
bucketCapabilities
public Set<BucketCapabilities> bucketCapabilities()
Description copied from interface:BucketConfig
Returns all the capabilities that are enabled and recognized on this bucket.- Specified by:
bucketCapabilities
in interfaceBucketConfig
-
-