org.apache.hadoop.hbase
Class HServerAddress

java.lang.Object
  extended by org.apache.hadoop.hbase.HServerAddress
All Implemented Interfaces:
Comparable<HServerAddress>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<HServerAddress>

public class HServerAddress
extends Object
implements org.apache.hadoop.io.WritableComparable<HServerAddress>

HServerAddress is a "label" for a HBase server made of host and port number.


Constructor Summary
HServerAddress()
           
HServerAddress(HServerAddress other)
          Copy-constructor.
HServerAddress(InetSocketAddress address)
          Construct an instance from an InetSocketAddress.
HServerAddress(String hostAndPort)
           
HServerAddress(String bindAddress, int port)
           
 
Method Summary
 int compareTo(HServerAddress o)
           
 boolean equals(Object o)
           
 String getBindAddress()
           
 String getHostname()
           
 InetSocketAddress getInetSocketAddress()
           
 int getPort()
           
 int hashCode()
           
 void readFields(DataInput in)
           
 String toString()
           
 void write(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HServerAddress

public HServerAddress()

HServerAddress

public HServerAddress(InetSocketAddress address)
Construct an instance from an InetSocketAddress.

Parameters:
address - InetSocketAddress of server

HServerAddress

public HServerAddress(String hostAndPort)
Parameters:
hostAndPort - Hostname and port formatted as <hostname> ':' <port>

HServerAddress

public HServerAddress(String bindAddress,
                      int port)
Parameters:
bindAddress - Hostname
port - Port number

HServerAddress

public HServerAddress(HServerAddress other)
Copy-constructor.

Parameters:
other - HServerAddress to copy from
Method Detail

getBindAddress

public String getBindAddress()
Returns:
Bind address

getPort

public int getPort()
Returns:
Port number

getHostname

public String getHostname()
Returns:
Hostname

getInetSocketAddress

public InetSocketAddress getInetSocketAddress()
Returns:
The InetSocketAddress

toString

public String toString()
Overrides:
toString in class Object
Returns:
String formatted as <bind address> ':' <port>

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException

compareTo

public int compareTo(HServerAddress o)
Specified by:
compareTo in interface Comparable<HServerAddress>


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