org.apache.hama.bsp
Class ID

java.lang.Object
  extended by org.apache.hama.bsp.ID
All Implemented Interfaces:
java.lang.Comparable<ID>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<ID>
Direct Known Subclasses:
BSPJobID, TaskAttemptID, TaskID

public abstract class ID
extends java.lang.Object
implements org.apache.hadoop.io.WritableComparable<ID>

A general identifier, which internally stores the id as an integer. This is the super class of BSPJobID, TaskID and TaskAttemptID .


Field Summary
protected  int id
           
protected static char SEPARATOR
           
 
Constructor Summary
protected ID()
           
  ID(int id)
           
 
Method Summary
 int compareTo(ID that)
           
 boolean equals(java.lang.Object o)
           
 int getId()
           
 int hashCode()
           
 void readFields(java.io.DataInput in)
           
 java.lang.String toString()
           
 void write(java.io.DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SEPARATOR

protected static final char SEPARATOR
See Also:
Constant Field Values

id

protected int id
Constructor Detail

ID

public ID(int id)

ID

protected ID()
Method Detail

getId

public int getId()

toString

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

hashCode

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

equals

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

compareTo

public int compareTo(ID that)
Specified by:
compareTo in interface java.lang.Comparable<ID>

readFields

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

write

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


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