com.nhncorp.neptune.tablet
Class TabletInfo

java.lang.Object
  extended by com.nhncorp.neptune.tablet.TabletInfo
All Implemented Interfaces:
NWritable, NWritableComparable, java.lang.Comparable

public class TabletInfo
extends java.lang.Object
implements NWritableComparable

Tablet에 대한 정보(ValueObject)

Author:
김형준

Constructor Summary
TabletInfo()
           
TabletInfo(java.lang.String tableName, java.lang.String tabletName)
           
TabletInfo(java.lang.String tableName, java.lang.String tabletName, Row.Key endRowKey)
           
TabletInfo(java.lang.String tableName, java.lang.String tabletName, Row.Key startRowKey, Row.Key endRowKey)
           
 
Method Summary
 int compareTo(java.lang.Object obj)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAssignedHostName()
          특정 rowkey에 대해 서비스 여부를 반환한다.
 Row.Key getEndRowKey()
           
 java.lang.String getTableName()
           
 java.lang.String getTabletName()
           
 GPath getTabletPath()
           
 byte[] getWriteBytes()
           
 int hashCode()
           
 boolean isAssigned()
           
 void readFields(byte[] value)
           
 void readFields(java.io.DataInput in)
          Reads the fields of this object from in.
 void setAssignedHostName(java.lang.String assignedHostName)
           
 void setEndRowKey(Row.Key endRowKey)
           
 void setTableName(java.lang.String tableName)
           
 void setTabletName(java.lang.String tabletName)
           
 java.lang.String toString()
           
 void write(java.io.DataOutput out)
          Writes the fields of this object to out.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TabletInfo

public TabletInfo()

TabletInfo

public TabletInfo(java.lang.String tableName,
                  java.lang.String tabletName)

TabletInfo

public TabletInfo(java.lang.String tableName,
                  java.lang.String tabletName,
                  Row.Key endRowKey)

TabletInfo

public TabletInfo(java.lang.String tableName,
                  java.lang.String tabletName,
                  Row.Key startRowKey,
                  Row.Key endRowKey)
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getEndRowKey

public Row.Key getEndRowKey()

setEndRowKey

public void setEndRowKey(Row.Key endRowKey)

getTabletPath

public GPath getTabletPath()

getTableName

public java.lang.String getTableName()

setTableName

public void setTableName(java.lang.String tableName)

getTabletName

public java.lang.String getTabletName()

setTabletName

public void setTabletName(java.lang.String tabletName)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getAssignedHostName

public java.lang.String getAssignedHostName()
특정 rowkey에 대해 서비스 여부를 반환한다.

Parameters:
rowKey -
Returns:

setAssignedHostName

public void setAssignedHostName(java.lang.String assignedHostName)

readFields

public void readFields(java.io.DataInput in)
                throws java.io.IOException
Description copied from interface: NWritable
Reads 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 NWritable
Throws:
java.io.IOException

write

public void write(java.io.DataOutput out)
           throws java.io.IOException
Description copied from interface: NWritable
Writes the fields of this object to out.

Specified by:
write in interface NWritable
Throws:
java.io.IOException

isAssigned

public boolean isAssigned()

readFields

public void readFields(byte[] value)
                throws java.io.IOException
Throws:
java.io.IOException

getWriteBytes

public byte[] getWriteBytes()
                     throws java.io.IOException
Throws:
java.io.IOException

compareTo

public int compareTo(java.lang.Object obj)
Specified by:
compareTo in interface java.lang.Comparable