Class MessageIndex

java.lang.Object
com.swiftmq.swiftlet.queue.MessageIndex
All Implemented Interfaces:
Comparable

public class MessageIndex extends Object implements Comparable
MessageIndex is the index of one message in a queue.
Author:
IIT GmbH, Bremen/Germany, Copyright (c) 2000-2002, All Rights Reserved
  • 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

      public boolean equals(Object obj)
      Implementation of Comparable.
      Overrides:
      equals in class Object
      Parameters:
      obj - a message index.
      Returns:
      true/false.
    • compareTo

      public int compareTo(Object obj)
      Implementation of Comparable.
      Specified by:
      compareTo in interface Comparable
      Parameters:
      obj - a message index.
      Returns:
      true/false.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • writeContent

      public void writeContent(DataOutput out) throws IOException
      Writes the content of this object to the stream.
      Parameters:
      out - outstream.
      Throws:
      IOException - on error.
    • readContent

      public void readContent(DataInput in) throws IOException
      Reads the content from the stream.
      Parameters:
      in - instream.
      Throws:
      IOException - on error.
    • toString

      public String toString()
      Overrides:
      toString in class Object