Class DefaultClusterInfo

All Implemented Interfaces:

public class DefaultClusterInfo
extends Object
implements ClusterInfo
Default implementation for a ClusterInfo.
Michael Nitschinger
  • Constructor Details

    • DefaultClusterInfo

      public DefaultClusterInfo​(JsonObject raw)
  • Method Details

    • raw

      public JsonObject raw()
      Description copied from interface: ClusterInfo
      Provides raw access to the full JSON information from the server.
      Specified by:
      raw in interface ClusterInfo
      the raw JSON cluster info.
    • checkAvailable

      public boolean checkAvailable​(CouchbaseFeature feature)
      Description copied from interface: ClusterInfo
      Checks the availability of a specified CouchbaseFeature on the associated Cluster. Note that this relies on ClusterInfo.getMinVersion(). If said method returns Version.NO_VERSION then the feature will be deemed unavailable (this method will return false).
      Specified by:
      checkAvailable in interface ClusterInfo
      feature - the feature to check for.
      true if minimum node server version is compatible with the feature, false otherwise.
      See Also:
    • getMinVersion

      public Version getMinVersion()
      Description copied from interface: ClusterInfo
      Returns the smallest node version (thus oldest version) in the cluster from which this ClusterInfo was taken. If list of version cannot be obtained then this returns Version.NO_VERSION.
      Specified by:
      getMinVersion in interface ClusterInfo
      the smallest (oldest) server version in the cluster.
    • getAllVersions

      public List<Version> getAllVersions()
      Description copied from interface: ClusterInfo
      Returns the list of Version obtained from the cluster from which this ClusterInfo was obtained. In case the versions cannot be obtained, an empty list is returned.
      Specified by:
      getAllVersions in interface ClusterInfo
      the list of nodes versions, or an empty list in case of errors.