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>

Deprecated. Use InetSocketAddress or ServerName or a hostname String and port.

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

HServerAddress hosts a InetSocketAddress and makes it WritableComparable. Resolves on construction AND on deserialization -- since we're internally creating an InetSocketAddress -- so could end up with different results if the two ends of serialization have different resolvers. Be careful where you use it. Should only be used when you need to pass an InetSocketAddress across an RPC. Even then its a bad idea because of the above resolve issue.


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

Constructor Detail

HServerAddress

public HServerAddress()
Deprecated. 
Constructor for deserialization use only.


HServerAddress

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

Parameters:
address - InetSocketAddress of server

HServerAddress

public HServerAddress(String hostname,
                      int port)
Deprecated. 
Parameters:
hostname - Hostname
port - Port number

HServerAddress

public HServerAddress(HServerAddress other)
Deprecated. 
Copy-constructor.

Parameters:
other - HServerAddress to copy from
Method Detail

getBindAddress

public String getBindAddress()
Deprecated. 
Returns:
Bind address -- the raw IP, the result of a call to InetSocketAddress#getAddress()#getHostAddress() -- or null if cannot resolve

getPort

public int getPort()
Deprecated. 
Returns:
Port number

getHostname

public String getHostname()
Deprecated. 
Returns:
Hostname

getHostnameAndPort

public String getHostnameAndPort()
Deprecated. 
Returns:
Returns ':'

getInetSocketAddress

public InetSocketAddress getInetSocketAddress()
Deprecated. 
Returns:
The InetSocketAddress

toString

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

equals

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

hashCode

public int hashCode()
Deprecated. 
Overrides:
hashCode in class Object

readFields

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

write

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

compareTo

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


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