Package deltix.qsrv.hf.blocks
Class RawMessageQueue
- java.lang.Object
-
- deltix.qsrv.hf.blocks.RawMessageQueue
-
- All Implemented Interfaces:
MarketMessageQueue<RawMessage>
public class RawMessageQueue extends java.lang.Object implements MarketMessageQueue<RawMessage>
-
-
Constructor Summary
Constructors Constructor Description RawMessageQueue(int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(RawMessage msg)
Adds element to the tail of the queue.void
dispose()
boolean
isEmpty()
boolean
isFull()
RawMessage
peek()
Retrieves, but does not remove, the head of this queue, or returnsnull
if this queue is empty.RawMessage
peekLast()
Retrieves, but does not remove, the tail of this queue, or returnsnull
if this queue is empty.void
release(RawMessage msg)
RawMessage
remove()
Retrieves and removes the head of this queue, or returnsnull
if this queue is empty.int
size()
-
-
-
Method Detail
-
add
public void add(RawMessage 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 interfaceMarketMessageQueue<RawMessage>
-
remove
public RawMessage remove()
Description copied from interface:MarketMessageQueue
Retrieves and removes the head of this queue, or returnsnull
if this queue is empty.- Specified by:
remove
in interfaceMarketMessageQueue<RawMessage>
- Returns:
- the head of this queue, or
null
if this queue is empty
-
peek
public RawMessage peek()
Description copied from interface:MarketMessageQueue
Retrieves, but does not remove, the head of this queue, or returnsnull
if this queue is empty.- Specified by:
peek
in interfaceMarketMessageQueue<RawMessage>
-
peekLast
public RawMessage peekLast()
Description copied from interface:MarketMessageQueue
Retrieves, but does not remove, the tail of this queue, or returnsnull
if this queue is empty.- Specified by:
peekLast
in interfaceMarketMessageQueue<RawMessage>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceMarketMessageQueue<RawMessage>
-
isFull
public boolean isFull()
- Specified by:
isFull
in interfaceMarketMessageQueue<RawMessage>
-
size
public int size()
- Specified by:
size
in interfaceMarketMessageQueue<RawMessage>
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceMarketMessageQueue<RawMessage>
-
release
public void release(RawMessage msg)
- Specified by:
release
in interfaceMarketMessageQueue<RawMessage>
-
-