Class QueueMemory

java.lang.Object
com.swiftmq.impl.streams.comp.memory.Memory
com.swiftmq.impl.streams.comp.memory.QueueMemory
Direct Known Subclasses:
TempQueueMemory

public class QueueMemory extends Memory
Memory implementation that stores all Messages as persistent Messages in a regular Queue.
Author:
IIT Software GmbH, Muenster/Germany, (c) 2016, All Rights Reserved
  • Method Details

    • getQueueName

      protected String getQueueName()
    • getDeliveryMode

      protected int getDeliveryMode()
    • shared

      public QueueMemory shared()
      Marks the Queue that is used as backstore as shared by multiple QueueMemories. This QueueMemory will then add a Property "_memory" to each Message to identify the Messages of this QueueMemory.
      Returns:
      this
    • reload

      public void reload() throws Exception
      Description copied from class: Memory
      Internal use.
      Specified by:
      reload in class Memory
      Throws:
      Exception
    • add

      public Memory add(Message message) throws Exception
      Description copied from class: Memory
      Add a Message to the Memory.
      Specified by:
      add in class Memory
      Parameters:
      message - Message
      Returns:
      Memory
      Throws:
      Exception
    • remove

      public Memory remove(int index) throws Exception
      Description copied from class: Memory
      Removes the Message at the index.
      Specified by:
      remove in class Memory
      Parameters:
      index - index
      Returns:
      Memory
      Throws:
      Exception
    • removeOlderThan

      public Memory removeOlderThan(long time) throws Exception
      Description copied from class: Memory
      Removes all Messages with a store time older than time.
      Specified by:
      removeOlderThan in class Memory
      Parameters:
      time - Time
      Returns:
      Memory
      Throws:
      Exception
    • getStoreTime

      public long getStoreTime(int index)
      Description copied from class: Memory
      Internal use.
      Specified by:
      getStoreTime in class Memory
    • removeOlderThan

      public Memory removeOlderThan(long time, boolean executeCallback) throws Exception
      Description copied from class: Memory
      Internal use.
      Specified by:
      removeOlderThan in class Memory
      Throws:
      Exception
    • at

      public Message at(int index) throws Exception
      Description copied from class: Memory
      Returns the Message at the index.
      Specified by:
      at in class Memory
      Parameters:
      index - index
      Returns:
      Message
      Throws:
      Exception
    • size

      public int size() throws Exception
      Description copied from class: Memory
      Returns the number of Messages stored in this Memory.
      Specified by:
      size in class Memory
      Returns:
      Number Messages
      Throws:
      Exception
    • clear

      public Memory clear() throws Exception
      Description copied from class: Memory
      Removes all Messages from this Memory.
      Specified by:
      clear in class Memory
      Returns:
      Memory
      Throws:
      Exception
    • select

      public Memory select(String selector) throws Exception
      Description copied from class: Memory
      Applies a JMS message selector to all Messages in this Memory and returns a new non-queue Memory with the result.
      Specified by:
      select in class Memory
      Parameters:
      selector - JMS Message Selector
      Returns:
      Result
      Throws:
      Exception
    • remove

      public Memory remove(String selector) throws Exception
      Description copied from class: Memory
      Removes all Messages from this Memory that matches the JMS message selector and returns this Memory.
      Specified by:
      remove in class Memory
      Parameters:
      selector - JMS Message Selector
      Returns:
      Memory (this)
      Throws:
      Exception
    • deferredClose

      public void deferredClose()
      Description copied from class: Memory
      Internal use.
      Overrides:
      deferredClose in class Memory
    • toString

      public String toString()
      Overrides:
      toString in class Object