Class Cluster

java.lang.Object
org.apache.hadoop.hbase.rest.client.Cluster

@Public public class Cluster extends Object
A list of 'host:port' addresses of HTTP servers operating as a single entity, for example multiple redundant web service gateways.
  • Field Details

  • Constructor Details

    • Cluster

      public Cluster()
      Constructor
    • Cluster

      public Cluster(List<String> nodes)
      Constructor
      Parameters:
      nodes - a list of service locations, in 'host:port' format
  • Method Details

    • isEmpty

      public boolean isEmpty()
      Returns true if no locations have been added, false otherwise
    • add

      public Cluster add(String node)
      Add a node to the cluster
      Parameters:
      node - the service location in 'host:port' format
    • add

      public Cluster add(String name, int port)
      Add a node to the cluster
      Parameters:
      name - host name
      port - service port
    • remove

      public Cluster remove(String node)
      Remove a node from the cluster
      Parameters:
      node - the service location in 'host:port' format
    • remove

      public Cluster remove(String name, int port)
      Remove a node from the cluster
      Parameters:
      name - host name
      port - service port
    • toString

      public String toString()
      Overrides:
      toString in class Object