cgl.imr.types
Class LongKey

java.lang.Object
  extended by cgl.imr.types.LongKey
All Implemented Interfaces:
Key, TwisterConstants, TwisterSerializable

public class LongKey
extends Object
implements Key

Key holding a long value.


Nested Class Summary
 
Nested classes/interfaces inherited from interface cgl.imr.base.TwisterConstants
TwisterConstants.JobState
 
Field Summary
 
Fields inherited from interface cgl.imr.base.TwisterConstants
COMBINE_INPUT, COMBINE_TOPIC_BASE, DIR_LIST_REQ, DIR_LIST_RES, FAILED, FIXED_DATA_FILE, FIXED_DATA_MODEL, HEP_DATA_STRING, MAP_ITERATIONS_OVER, MAP_REDUCE_TOPIC_BASE, MAP_TASK, MAP_TASK_REQUEST, MAP_WORKER_STARTED, MAPPER_REQUEST, MONITOR_REQUEST, MONITOR_RESPONSE, MONITOR_SLEEP_TIME, NEW_JOB_REQUEST, NEW_JOB_RESPONSE, NUM_MAP_TASKS, NUM_REDUCE_TASKS, PARTITION_FILE_RESPONSE_TOPIC_BASE, PARTITION_FILE_SPLIT_PATTERN, PROPERTIES_FILE, REDUCE_INPUT, REDUCE_RESPONSE, REDUCE_TASK, REDUCE_TASK_REQUEST, REDUCE_TOPIC_BASE, REDUCE_WORKER_REQUEST, RESPONSE_TOPIC_BASE, SEND_RECV_MAX_SLEEP_TIME, SEND_RECV_SLEEP_TIME, SUCCESS, TASK_STATUS, WORKER_RESPONSE
 
Constructor Summary
LongKey()
           
LongKey(byte[] data)
           
LongKey(long key)
           
LongKey(Long key)
           
 
Method Summary
 boolean equals(Object longKey)
          Use to compare the keys.
 void fromBytes(byte[] bytes)
          Construct the object back from a previously serialized bytes.
 byte[] getBytes()
          Serialize the object and returns the bytes.
 Long getKey()
           
 int hashCode()
          Returns the hash code associated with this key.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LongKey

public LongKey()

LongKey

public LongKey(byte[] data)
        throws SerializationException
Throws:
SerializationException

LongKey

public LongKey(long key)

LongKey

public LongKey(Long key)
Method Detail

equals

public boolean equals(Object longKey)
Description copied from interface: Key
Use to compare the keys.

Specified by:
equals in interface Key
Overrides:
equals in class Object
Parameters:
longKey - Another key.
Returns:
boolean equality check.

fromBytes

public void fromBytes(byte[] bytes)
               throws SerializationException
Description copied from interface: TwisterSerializable
Construct the object back from a previously serialized bytes.

Specified by:
fromBytes in interface TwisterSerializable
Throws:
SerializationException

getBytes

public byte[] getBytes()
                throws SerializationException
Description copied from interface: TwisterSerializable
Serialize the object and returns the bytes.

Specified by:
getBytes in interface TwisterSerializable
Returns:
byte[] of serialized object.
Throws:
SerializationException

getKey

public Long getKey()

hashCode

public int hashCode()
Description copied from interface: Key
Returns the hash code associated with this key.

Specified by:
hashCode in interface Key
Overrides:
hashCode in class Object
Returns:
hashcode.


For comments and suggestions please send e-mail to