com.hazelcast.queue.impl
Class QueueItem

java.lang.Object
  extended by com.hazelcast.queue.impl.QueueItem
All Implemented Interfaces:
DataSerializable, IdentifiedDataSerializable, Comparable<QueueItem>
Direct Known Subclasses:
TxQueueItem

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

Queue Item.


Field Summary
protected  QueueContainer container
           
protected  long creationTime
           
protected  Data data
           
protected  long itemId
           
 
Constructor Summary
QueueItem()
           
QueueItem(QueueContainer container, long itemId, Data data)
           
 
Method Summary
 int compareTo(QueueItem o)
           
 boolean equals(Object o)
           
 long getCreationTime()
           
 Data getData()
           
 int getFactoryId()
          Returns DataSerializableFactory factory id for this class.
 int getId()
          Returns type identifier for this class.
 long getItemId()
           
 int hashCode()
           
 void readData(ObjectDataInput in)
          Reads fields from the input stream
 void setData(Data data)
           
 void setItemId(long itemId)
           
 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

data

protected Data data

creationTime

protected final long creationTime

container

protected QueueContainer container
Constructor Detail

QueueItem

public QueueItem()

QueueItem

public QueueItem(QueueContainer container,
                 long itemId,
                 Data data)
Method Detail

getData

public Data getData()

setData

public void setData(Data data)

getItemId

public long getItemId()

setItemId

public void setItemId(long itemId)

getCreationTime

public long getCreationTime()

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

compareTo

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

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

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object


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