Class PooledMarketMessageQueue

  • All Implemented Interfaces:
    MarketMessageQueue<deltix.timebase.api.messages.MarketMessage>

    public final class PooledMarketMessageQueue
    extends java.lang.Object
    implements MarketMessageQueue<deltix.timebase.api.messages.MarketMessage>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(deltix.timebase.api.messages.MarketMessage msg)
      Adds element to the tail of the queue.
      void dispose()  
      boolean isEmpty()  
      boolean isFull()  
      deltix.timebase.api.messages.MarketMessage peek()
      Retrieves, but does not remove, the head of this queue, or returns null if this queue is empty.
      deltix.timebase.api.messages.MarketMessage peekLast()
      Retrieves, but does not remove, the tail of this queue, or returns null if this queue is empty.
      void release​(deltix.timebase.api.messages.MarketMessage msg)  
      deltix.timebase.api.messages.MarketMessage remove()
      Retrieves and removes the head of this queue, or returns null if this queue is empty.
      int size()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PooledMarketMessageQueue

        public PooledMarketMessageQueue​(int size)
    • Method Detail

      • add

        public void add​(deltix.timebase.api.messages.MarketMessage msg)
        Description copied from interface: MarketMessageQueue
        Adds element to the tail of the queue. If capacity is exceeded new element overrides the oldest one (head)
        Specified by:
        add in interface MarketMessageQueue<deltix.timebase.api.messages.MarketMessage>
      • remove

        public deltix.timebase.api.messages.MarketMessage remove()
        Description copied from interface: MarketMessageQueue
        Retrieves and removes the head of this queue, or returns null if this queue is empty.
        Specified by:
        remove in interface MarketMessageQueue<deltix.timebase.api.messages.MarketMessage>
        Returns:
        the head of this queue, or null if this queue is empty
      • release

        public void release​(deltix.timebase.api.messages.MarketMessage msg)
        Specified by:
        release in interface MarketMessageQueue<deltix.timebase.api.messages.MarketMessage>
      • peek

        public deltix.timebase.api.messages.MarketMessage peek()
        Description copied from interface: MarketMessageQueue
        Retrieves, but does not remove, the head of this queue, or returns null if this queue is empty.
        Specified by:
        peek in interface MarketMessageQueue<deltix.timebase.api.messages.MarketMessage>
      • peekLast

        public deltix.timebase.api.messages.MarketMessage peekLast()
        Description copied from interface: MarketMessageQueue
        Retrieves, but does not remove, the tail of this queue, or returns null if this queue is empty.
        Specified by:
        peekLast in interface MarketMessageQueue<deltix.timebase.api.messages.MarketMessage>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface MarketMessageQueue<deltix.timebase.api.messages.MarketMessage>
      • isFull

        public boolean isFull()
        Specified by:
        isFull in interface MarketMessageQueue<deltix.timebase.api.messages.MarketMessage>
      • size

        public int size()
        Specified by:
        size in interface MarketMessageQueue<deltix.timebase.api.messages.MarketMessage>
      • dispose

        public void dispose()
        Specified by:
        dispose in interface MarketMessageQueue<deltix.timebase.api.messages.MarketMessage>