Package com.swiftmq.swiftlet.queue
Class MessageIndex
java.lang.Object
com.swiftmq.swiftlet.queue.MessageIndex
- All Implemented Interfaces:
Comparable
MessageIndex is the index of one message in a queue.
- Author:
- IIT GmbH, Bremen/Germany, Copyright (c) 2000-2002, All Rights Reserved
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new MessageIndex.MessageIndex
(long id, int priority, int deliveryCount) Creates a new MessageIndex. -
Method Summary
Modifier and TypeMethodDescriptionint
Implementation of Comparable.boolean
Implementation of Comparable.int
Returns the delivery count.long
getId()
Returns the message id.int
Returns the priority.int
getTxId()
Returns the transaction id.int
hashCode()
void
readContent
(DataInput in) Reads the content from the stream.void
setDeliveryCount
(int deliveryCount) Sets the delivery count.void
setId
(long id) Sets the message id.void
setPriority
(int priority) Sets the priority.void
setTxId
(int txId) Sets the transaction id.toString()
void
writeContent
(DataOutput out) Writes the content of this object to the stream.
-
Constructor Details
-
MessageIndex
public MessageIndex()Creates a new MessageIndex. -
MessageIndex
public MessageIndex(long id, int priority, int deliveryCount) Creates a new MessageIndex.- Parameters:
id
- message id.priority
- priority.deliveryCount
- delivery count.
-
-
Method Details
-
getId
public long getId()Returns the message id.- Returns:
- message id.
-
setId
public void setId(long id) Sets the message id.- Parameters:
id
- message id.
-
getPriority
public int getPriority()Returns the priority.- Returns:
- priority.
-
setPriority
public void setPriority(int priority) Sets the priority.- Parameters:
priority
- priority.
-
getDeliveryCount
public int getDeliveryCount()Returns the delivery count.- Returns:
- delivery count.
-
setDeliveryCount
public void setDeliveryCount(int deliveryCount) Sets the delivery count.- Parameters:
deliveryCount
- delivery count.
-
getTxId
public int getTxId()Returns the transaction id.- Returns:
- transaction id.
-
setTxId
public void setTxId(int txId) Sets the transaction id.- Parameters:
txId
- transaction id.
-
equals
Implementation of Comparable. -
compareTo
Implementation of Comparable.- Specified by:
compareTo
in interfaceComparable
- Parameters:
obj
- a message index.- Returns:
- true/false.
-
hashCode
public int hashCode() -
writeContent
Writes the content of this object to the stream.- Parameters:
out
- outstream.- Throws:
IOException
- on error.
-
readContent
Reads the content from the stream.- Parameters:
in
- instream.- Throws:
IOException
- on error.
-
toString
-