com.hazelcast.collection
Class CollectionItem
java.lang.Object
com.hazelcast.collection.CollectionItem
- All Implemented Interfaces:
- DataSerializable, IdentifiedDataSerializable, Comparable<CollectionItem>
- Direct Known Subclasses:
- TxCollectionItem
public class CollectionItem
- extends Object
- implements Comparable<CollectionItem>, IdentifiedDataSerializable
itemId
protected long itemId
value
protected Data value
creationTime
protected final long creationTime
CollectionItem
public CollectionItem()
CollectionItem
public CollectionItem(long itemId,
Data value)
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.