Class AbstractBucketConfig

    • Method Detail

      • uuid

        public String uuid()
        Description copied from interface: BucketConfig
        Returns the UUID of the bucket, or null 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 interface BucketConfig
        Returns:
        bucket UUID, or null.
      • name

        public String name()
        Description copied from interface: BucketConfig
        The name of the bucket.
        Specified by:
        name in interface BucketConfig
        Returns:
        name of the bucket.
      • uri

        public String uri()
        Description copied from interface: BucketConfig
        The HTTP Uri for this bucket configuration.
        Specified by:
        uri in interface BucketConfig
        Returns:
        the uri.
      • streamingUri

        public String streamingUri()
        Description copied from interface: BucketConfig
        The HTTP Streaming URI for this bucket.
        Specified by:
        streamingUri in interface BucketConfig
        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 interface BucketConfig
        Returns:
        the list of nodes.
      • rev

        public long rev()
        Description copied from interface: BucketConfig
        Revision number (optional) for that configuration.
        Specified by:
        rev in interface BucketConfig
        Returns:
        the rev number, might be 0.
      • revEpoch

        public long revEpoch()
        Description copied from interface: BucketConfig
        This field serves to enable the server to provide higher-level guidance with regards to configuration priority.

        This 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).

        Specified by:
        revEpoch in interface BucketConfig
      • serviceEnabled

        public boolean serviceEnabled​(ServiceType type)
        Description copied from interface: BucketConfig
        Check if the service is enabled on the bucket.
        Specified by:
        serviceEnabled in interface BucketConfig
        Parameters:
        type - the type to check.
        Returns:
        true if it is, false otherwise.
      • portInfos

        public List<PortInfo> portInfos()
        Description copied from interface: BucketConfig
        Returns the port information from the "nodesExt" section.

        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.

        Specified by:
        portInfos in interface BucketConfig
        Returns:
        the port infos.