Class OrderRingBuffer
java.lang.Object
com.quantfinlib.trading.OrderRingBuffer
Zero-allocation single-producer / single-consumer ring buffer for order
messages — the order-entry mirror of the market-data
TickRingBuffer: preallocated primitive slots, cache-line-padded
sequences, acquire/release publication, and producer/consumer sequence
caching.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
OrderRingBuffer
public OrderRingBuffer(int requestedCapacity)
-
-
Method Details
-
publish
public boolean publish(long orderId, int symbolId, Side side, long quantity, double price, long timestampNanos) Producer side (trading thread). Returns false when full. -
drainTo
Consumer side (venue thread). Drains up tolimitorders into the sink. -
isEmpty
public boolean isEmpty() -
capacity
public int capacity()
-