Class MessageIndex

  • All Implemented Interfaces:
    java.lang.Comparable
    Direct Known Subclasses:
    StoreId

    public class MessageIndex
    extends java.lang.Object
    implements java.lang.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

      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
      int compareTo​(java.lang.Object obj)
      Implementation of Comparable.
      boolean equals​(java.lang.Object obj)
      Implementation of Comparable.
      int getDeliveryCount()
      Returns the delivery count.
      long getId()
      Returns the message id.
      int getPriority()
      Returns the priority.
      int getTxId()
      Returns the transaction id.
      int hashCode()  
      void readContent​(java.io.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.
      java.lang.String toString()  
      void writeContent​(java.io.DataOutput out)
      Writes the content of this object to the stream.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • 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 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:
        equals in class java.lang.Object
        Parameters:
        obj - a message index.
        Returns:
        true/false.
      • compareTo

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

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

        public void writeContent​(java.io.DataOutput out)
                          throws java.io.IOException
        Writes 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.IOException
        Reads the content from the stream.
        Parameters:
        in - instream.
        Throws:
        java.io.IOException - on error.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object