org.apache.hadoop.hbase
Class HServerInfo

java.lang.Object
  extended by org.apache.hadoop.hbase.HServerInfo
All Implemented Interfaces:
Writable

public class HServerInfo
extends Object
implements Writable

HServerInfo contains metainfo about an HRegionServer, Currently it only contains the server start code. In the future it will contain information about the source machine and load statistics.


Constructor Summary
HServerInfo()
          default constructor - used by Writable
HServerInfo(HServerAddress serverAddress, long startCode, int infoPort)
          Constructor
HServerInfo(HServerInfo other)
          Construct a new object using another as input (like a copy constructor)
 
Method Summary
 boolean equals(Object obj)
           
 int getInfoPort()
           
 HServerLoad getLoad()
           
 HServerAddress getServerAddress()
           
 long getStartCode()
           
 int hashCode()
           
 void readFields(DataInput in)
          Deserialize the fields of this object from in.
 void setLoad(HServerLoad load)
           
 void setStartCode(long startCode)
           
 String toString()
          
 void write(DataOutput out)
          Serialize the fields of this object to out.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HServerInfo

public HServerInfo()
default constructor - used by Writable


HServerInfo

public HServerInfo(HServerAddress serverAddress,
                   long startCode,
                   int infoPort)
Constructor

Parameters:
serverAddress -
startCode -
infoPort - Port the info server is listening on.

HServerInfo

public HServerInfo(HServerInfo other)
Construct a new object using another as input (like a copy constructor)

Parameters:
other -
Method Detail

getLoad

public HServerLoad getLoad()
Returns:
the load

setLoad

public void setLoad(HServerLoad load)
Parameters:
load - the load to set

getServerAddress

public HServerAddress getServerAddress()
Returns:
the server address

getStartCode

public long getStartCode()
Returns:
the server start code

getInfoPort

public int getInfoPort()
Returns:
Port the info server is listening on.

setStartCode

public void setStartCode(long startCode)
Parameters:
startCode - the startCode to set

toString

public String toString()

Overrides:
toString in class Object

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

readFields

public void readFields(DataInput in)
                throws IOException
Description copied from interface: Writable
Deserialize the fields of this object from in.

For efficiency, implementations should attempt to re-use storage in the existing object where possible.

Specified by:
readFields in interface Writable
Parameters:
in - DataInput to deseriablize this object from.
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Description copied from interface: Writable
Serialize the fields of this object to out.

Specified by:
write in interface Writable
Parameters:
out - DataOuput to serialize this object into.
Throws:
IOException


Copyright © 2006 The Apache Software Foundation