public abstract class AbstractBucketConfig extends Object implements BucketConfig
| Modifier | Constructor and 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,
long rev,
long revEpoch) |
| Modifier and Type | Method and 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.
|
List<PortInfo> |
portInfos()
Returns the port information from the "nodesExt" section.
|
long |
rev()
Revision number (optional) for that configuration.
|
long |
revEpoch()
This field serves to enable the server to provide higher-level guidance with regards to configuration priority.
|
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, or
null if the bucket does not have a UUID. |
ConfigVersion |
version() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasFastForwardMap, tainted, typeprotected 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, long rev, long revEpoch)
public String uuid()
BucketConfignull 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.
uuid in interface BucketConfignull.public String name()
BucketConfigname in interface BucketConfigpublic BucketNodeLocator locator()
BucketConfiglocator in interface BucketConfigpublic String uri()
BucketConfiguri in interface BucketConfigpublic String streamingUri()
BucketConfigstreamingUri in interface BucketConfigpublic List<NodeInfo> nodes()
BucketConfignodes in interface BucketConfigpublic long rev()
BucketConfigrev in interface BucketConfigpublic long revEpoch()
BucketConfigThis will be used during manual failovers to ensure that even if the minority side of the cluster is being selected, that consumers can keep the correct configurations.
If revEpoch is not included in the config, it is set to 0 (it starts with 1 on configs that have it).
revEpoch in interface BucketConfigpublic ConfigVersion version()
version in interface BucketConfigpublic boolean serviceEnabled(ServiceType type)
BucketConfigserviceEnabled in interface BucketConfigtype - the type to check.public Map<ServiceType,Set<ClusterCapabilities>> clusterCapabilities()
BucketConfigclusterCapabilities in interface BucketConfigpublic Set<BucketCapabilities> bucketCapabilities()
BucketConfigbucketCapabilities in interface BucketConfigpublic List<PortInfo> portInfos()
BucketConfig
NOTE: If you are unsure if you want to use this api, very likely you want to use BucketConfig.nodes() instead!
The nodes API is very similar to this port infos (in fact, they are built from each other), but there is one big difference: when the KV and VIEW service are defined on a bucket but not yet ready, the nodes API will NOT include them in the services list, while this API will. Most of the time you do not want to consume a service until it is ready, but for some functionality (like waitUntilReady) it can be needed to "look ahead" what will become active and wait for it.
portInfos in interface BucketConfigCopyright © 2024 Couchbase, Inc.. All rights reserved.