Interface MessageStore

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Close the store releasing associated system resources
      void commitChanges()
      Ensure everything is persisted (synchronous)
      void commitChanges​(SynchronizationBarrier barrier)
      Ensure everything is persisted (asynchronous)
      void delete()
      Delete the store
      void delete​(int handle)
      Delete message associated to the given handle from the store
      int first()
      Get the first message handle stored
      int getAbsoluteStoreUsage()
      Get the absolute store usage amount (%) (Ratio of used space over maximum allocatable space)
      int getDeliveryMode()
      Get the delivery mode for this store
      int getStoreUsage()
      Get the store usage amount (%) (Ratio of used space over currently allocated space)
      void init()
      Initialize the message store
      boolean isFailSafe()
      Test if the store is syncing on write
      boolean isLocked​(int handle)
      Check if the message associated with a given handle is locked
      void lock​(int handle)
      Lock the message associated to a given handle
      int next​(int handle)
      Get the next message handle after the given one
      int previous​(int handle)
      Get the previous message handle after the given one
      int replace​(int handle, AbstractMessage message)
      Replace a message in the store
      AbstractMessage retrieve​(int handle)
      Retrieve the message associated to a given handle
      int size()
      Get the number of messages in the store
      int store​(AbstractMessage message)
      Put some message under in the store after the last message with the same priority
      void unlock​(int handle)
      Unlock the message associated to a given handle
    • Method Detail

      • getStoreUsage

        int getStoreUsage()
        Get the store usage amount (%) (Ratio of used space over currently allocated space)
      • getAbsoluteStoreUsage

        int getAbsoluteStoreUsage()
        Get the absolute store usage amount (%) (Ratio of used space over maximum allocatable space)
      • first

        int first()
           throws javax.jms.JMSException
        Get the first message handle stored
        Returns:
        the first entry handle or -1 if the store is empty
        Throws:
        javax.jms.JMSException
      • next

        int next​(int handle)
          throws javax.jms.JMSException
        Get the next message handle after the given one
        Parameters:
        handle - block handle
        Returns:
        the next entry handle or -1 if their is no successor
        Throws:
        javax.jms.JMSException
      • previous

        int previous​(int handle)
              throws javax.jms.JMSException
        Get the previous message handle after the given one
        Parameters:
        handle - message handle
        Returns:
        the previous entry handle or -1 if their is no successor
        Throws:
        javax.jms.JMSException
      • store

        int store​(AbstractMessage message)
           throws javax.jms.JMSException
        Put some message under in the store after the last message with the same priority
        Parameters:
        message - the message to store
        Throws:
        javax.jms.JMSException
      • replace

        int replace​(int handle,
                    AbstractMessage message)
             throws javax.jms.JMSException
        Replace a message in the store
        Parameters:
        handle - message handle
        message - the message to store
        Throws:
        javax.jms.JMSException
      • delete

        void delete​(int handle)
             throws javax.jms.JMSException
        Delete message associated to the given handle from the store
        Throws:
        javax.jms.JMSException - on storage error or invalid handle
      • retrieve

        AbstractMessage retrieve​(int handle)
                          throws javax.jms.JMSException
        Retrieve the message associated to a given handle
        Throws:
        javax.jms.JMSException - on storage error or invalid handle
      • lock

        void lock​(int handle)
           throws javax.jms.JMSException
        Lock the message associated to a given handle
        Throws:
        javax.jms.JMSException - on storage error or invalid handle
      • unlock

        void unlock​(int handle)
             throws javax.jms.JMSException
        Unlock the message associated to a given handle
        Throws:
        javax.jms.JMSException - on storage error or invalid handle
      • isLocked

        boolean isLocked​(int handle)
                  throws javax.jms.JMSException
        Check if the message associated with a given handle is locked
        Throws:
        javax.jms.JMSException - on storage error or invalid handle
      • size

        int size()
        Get the number of messages in the store
      • commitChanges

        void commitChanges​(SynchronizationBarrier barrier)
                    throws javax.jms.JMSException
        Ensure everything is persisted (asynchronous)
        Throws:
        javax.jms.JMSException
      • commitChanges

        void commitChanges()
                    throws javax.jms.JMSException
        Ensure everything is persisted (synchronous)
        Throws:
        javax.jms.JMSException
      • init

        void init()
           throws javax.jms.JMSException
        Initialize the message store
        Throws:
        javax.jms.JMSException
      • close

        void close()
            throws javax.jms.JMSException
        Close the store releasing associated system resources
        Throws:
        javax.jms.JMSException
      • delete

        void delete()
             throws javax.jms.JMSException
        Delete the store
        Throws:
        javax.jms.JMSException
      • isFailSafe

        boolean isFailSafe()
        Test if the store is syncing on write
      • getDeliveryMode

        int getDeliveryMode()
        Get the delivery mode for this store