Class BinaryOrderPublisher
java.lang.Object
com.quantfinlib.sbe.BinaryOrderPublisher
- All Implemented Interfaces:
OrderListener,AutoCloseable
Binary order-entry adapter: attach to
HftOrderGateway as its
OrderListener and every accepted order is encoded as an
OrderFlyweight and written to the venue channel — the binary
counterpart of fix.FixSession#sendNewOrderSingle, with zero
allocation and zero string formatting per order.
Runs on the gateway's single venue thread, so writes need no lock; the reusable direct buffer is written fully (looping short writes) before the next order is encoded.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BinaryOrderPublisher
-
-
Method Details
-
onOrder
public void onOrder(long orderId, int symbolId, Side side, long quantity, double price, long timestampNanos) - Specified by:
onOrderin interfaceOrderListener
-
ordersSent
public long ordersSent() -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-