Package com.swiftmq.swiftlet.queue
Class MessageIndex
- java.lang.Object
-
- com.swiftmq.swiftlet.queue.MessageIndex
-
- All Implemented Interfaces:
java.lang.Comparable
public class MessageIndex extends java.lang.Object implements java.lang.ComparableMessageIndex is the index of one message in a queue.- Author:
- IIT GmbH, Bremen/Germany, Copyright (c) 2000-2002, All Rights Reserved
-
-
Constructor Summary
Constructors Constructor Description MessageIndex()Creates a new MessageIndex.MessageIndex(long id, int priority, int deliveryCount)Creates a new MessageIndex.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(java.lang.Object obj)Implementation of Comparable.booleanequals(java.lang.Object obj)Implementation of Comparable.intgetDeliveryCount()Returns the delivery count.longgetId()Returns the message id.intgetPriority()Returns the priority.intgetTxId()Returns the transaction id.inthashCode()voidreadContent(java.io.DataInput in)Reads the content from the stream.voidsetDeliveryCount(int deliveryCount)Sets the delivery count.voidsetId(long id)Sets the message id.voidsetPriority(int priority)Sets the priority.voidsetTxId(int txId)Sets the transaction id.java.lang.StringtoString()voidwriteContent(java.io.DataOutput out)Writes the content of this object to the stream.
-
-
-
Method Detail
-
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
public boolean equals(java.lang.Object obj)
Implementation of Comparable.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- a message index.- Returns:
- true/false.
-
compareTo
public int compareTo(java.lang.Object obj)
Implementation of Comparable.- Specified by:
compareToin interfacejava.lang.Comparable- Parameters:
obj- a message index.- Returns:
- true/false.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
writeContent
public void writeContent(java.io.DataOutput out) throws java.io.IOExceptionWrites the content of this object to the stream.- Parameters:
out- outstream.- Throws:
java.io.IOException- on error.
-
readContent
public void readContent(java.io.DataInput in) throws java.io.IOExceptionReads the content from the stream.- Parameters:
in- instream.- Throws:
java.io.IOException- on error.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-