Class HeapMemory

java.lang.Object
com.swiftmq.impl.streams.comp.memory.Memory
com.swiftmq.impl.streams.comp.memory.HeapMemory

public class HeapMemory extends Memory
Memory implementation that stores all Messages on the heap.
Author:
IIT Software GmbH, Muenster/Germany, (c) 2016, All Rights Reserved
  • Constructor Details

  • Method Details

    • 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
    • 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
    • getStoreTime

      public long getStoreTime(int index)
      Description copied from class: Memory
      Internal use.
      Specified by:
      getStoreTime in class Memory
    • 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
    • deferredClose

      public void deferredClose()
      Description copied from class: Memory
      Internal use.
      Overrides:
      deferredClose in class Memory
    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object