org.apache.hadoop.hbase.rest.client
Class Cluster

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

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 Summary
protected  String lastHost
           
protected  List<String> nodes
           
 
Constructor Summary
Cluster()
          Constructor
Cluster(List<String> nodes)
          Constructor
 
Method Summary
 Cluster add(String node)
          Add a node to the cluster
 Cluster add(String name, int port)
          Add a node to the cluster
 boolean isEmpty()
           
 Cluster remove(String node)
          Remove a node from the cluster
 Cluster remove(String name, int port)
          Remove a node from the cluster
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodes

protected List<String> nodes

lastHost

protected String lastHost
Constructor Detail

Cluster

public Cluster()
Constructor


Cluster

public Cluster(List<String> nodes)
Constructor

Parameters:
nodes - a list of service locations, in 'host:port' format
Method Detail

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


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.