com.hazelcast.collection
Class CollectionItem

java.lang.Object
  extended by com.hazelcast.collection.CollectionItem
All Implemented Interfaces:
DataSerializable, IdentifiedDataSerializable, Comparable<CollectionItem>
Direct Known Subclasses:
TxCollectionItem

public class CollectionItem
extends Object
implements Comparable<CollectionItem>, IdentifiedDataSerializable


Field Summary
protected  long creationTime
           
protected  long itemId
           
protected  Data value
           
 
Constructor Summary
CollectionItem()
           
CollectionItem(long itemId, Data value)
           
 
Method Summary
 int compareTo(CollectionItem o)
           
 boolean equals(Object o)
           
 long getCreationTime()
           
 int getFactoryId()
          Returns DataSerializableFactory factory id for this class.
 int getId()
          Returns type identifier for this class.
 long getItemId()
           
 Data getValue()
           
 int hashCode()
           
 void readData(ObjectDataInput in)
          Reads fields from the input stream
 void setValue(Data value)
           
 void writeData(ObjectDataOutput out)
          Writes object fields to output stream
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

itemId

protected long itemId

value

protected Data value

creationTime

protected final long creationTime
Constructor Detail

CollectionItem

public CollectionItem()

CollectionItem

public CollectionItem(long itemId,
                      Data value)
Method Detail

getItemId

public long getItemId()

getValue

public Data getValue()

setValue

public void setValue(Data value)

getCreationTime

public long getCreationTime()

compareTo

public int compareTo(CollectionItem o)
Specified by:
compareTo in interface Comparable<CollectionItem>

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getFactoryId

public int getFactoryId()
Description copied from interface: IdentifiedDataSerializable
Returns DataSerializableFactory factory id for this class.

Specified by:
getFactoryId in interface IdentifiedDataSerializable
Returns:
factory id

getId

public int getId()
Description copied from interface: IdentifiedDataSerializable
Returns type identifier for this class. Id should be unique per DataSerializableFactory.

Specified by:
getId in interface IdentifiedDataSerializable
Returns:
type id

writeData

public void writeData(ObjectDataOutput out)
               throws IOException
Description copied from interface: DataSerializable
Writes object fields to output stream

Specified by:
writeData in interface DataSerializable
Parameters:
out - output
Throws:
IOException

readData

public void readData(ObjectDataInput in)
              throws IOException
Description copied from interface: DataSerializable
Reads fields from the input stream

Specified by:
readData in interface DataSerializable
Parameters:
in - input
Throws:
IOException


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.