Interface BucketConfig
- All Known Subinterfaces:
CouchbaseBucketConfig
- All Known Implementing Classes:
AbstractBucketConfig,DefaultCouchbaseBucketConfig
public interface BucketConfig
Represents a Couchbase Bucket Configuration.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the bucket capabilities of this bucket config.booleanReturns 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.locator()The type of node locator in use for this bucket.name()The name of the bucket.nodes()The list of nodes associated with this bucket.password()The password of the bucket/user.Setter to inject the password manually into the config.rev()Revision number (optional) for that configuration.booleanserviceEnabled(ServiceType type) Check if the service is enabled on the bucket.The HTTP Streaming URI for this bucket.booleantainted()Returns true if the config indicates the cluster is undergoing a transition (such as a rebalance operation).type()The bucket type.uri()The HTTP Uri for this bucket configuration.Non null if alternate addresses should be used, false otherwise.voiduseAlternateNetwork(String useAlternateNetwork) Setter to set if external networking should be used or not.username()User authorized for the bucket access.Set user authorized for the bucket access.uuid()Returns the UUID of the bucket, ornullif the bucket does not have a UUID.
-
Method Details
-
uuid
String uuid()Returns the UUID of the bucket, ornullif 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.
- Returns:
- bucket UUID, or
null.
-
name
String name()The name of the bucket.- Returns:
- name of the bucket.
-
username
String username()User authorized for the bucket access.- Returns:
- username of the user.
-
username
Set user authorized for the bucket access.- Parameters:
username- the user authorized for bucket access- Returns:
- the config for chaining
-
password
String password()The password of the bucket/user.- Returns:
- the password of the bucket/user.
-
password
Setter to inject the password manually into the config.- Parameters:
password- the password of the bucket/user to inject.- Returns:
- the config for proper chaining.
-
locator
BucketNodeLocator locator()The type of node locator in use for this bucket.- Returns:
- the node locator type.
-
uri
String uri()The HTTP Uri for this bucket configuration.- Returns:
- the uri.
-
streamingUri
String streamingUri()The HTTP Streaming URI for this bucket.- Returns:
- the streaming uri.
-
nodes
The list of nodes associated with this bucket.- Returns:
- the list of nodes.
-
tainted
boolean tainted()Returns true if the config indicates the cluster is undergoing a transition (such as a rebalance operation).- Returns:
- true if a transition is in progress.
-
rev
BucketConfigRevision rev()Revision number (optional) for that configuration.- Returns:
- the rev number, might be 0.
-
type
BucketType type()The bucket type.- Returns:
- the bucket type.
-
serviceEnabled
Check if the service is enabled on the bucket.- Parameters:
type- the type to check.- Returns:
- true if it is, false otherwise.
-
hasFastForwardMap
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.- Returns:
- true if it does, false otherwise.
-
useAlternateNetwork
String useAlternateNetwork()Non null if alternate addresses should be used, false otherwise. -
useAlternateNetwork
Setter to set if external networking should be used or not.- Parameters:
useAlternateNetwork- if an alternate network should be used.
-
capabilities
List<BucketCapabilities> capabilities()Returns the bucket capabilities of this bucket config.
-