Class ItchCodec.View
java.lang.Object
com.quantfinlib.marketdata.ItchCodec.View
- Enclosing class:
ItchCodec
Mutable flyweight over one message in a caller-owned buffer. Reuse a
single instance per decoding thread; every getter is a direct
big-endian read. Getters are only meaningful for the message types
that carry the field (per the ITCH layout) — reading a field the type
does not carry returns garbage, exactly like pointing a C struct at
the wrong bytes. Type-specific getters
assert the type, so a
misdispatched read fails loudly in every test run and costs nothing
in production (assertions disabled).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongE: executed shares.longE/P: the venue's match (execution) number.longnewRef()U only: the new order reference.longorderRef()Order reference (A/F/E/X/D/P, and the original ref of U viaorigRef()).longorigRef()U only: the replaced (original) order reference.intPrice in 0.0001 ticks (A/F/P; U: the new price).longshares()A/F/P: displayed shares.byteside()A/F/P:ItchCodec.BUYorItchCodec.SELL.longstock()A/F/P: symbol as 8 packed ASCII bytes (compare againstItchCodec.packStock(java.lang.String)).intPer-symbol locate code — the feed's symbol id for the day.longNanoseconds since midnight (48-bit wire field).intbytetype()wrap(byte[] buffer, int offset) Points this view at a message; returnsthisfor chaining.
-
Constructor Details
-
View
public View()
-
-
Method Details
-
wrap
Points this view at a message; returnsthisfor chaining. -
type
public byte type() -
stockLocate
public int stockLocate()Per-symbol locate code — the feed's symbol id for the day. -
trackingNumber
public int trackingNumber() -
timestampNanos
public long timestampNanos()Nanoseconds since midnight (48-bit wire field). -
orderRef
public long orderRef()Order reference (A/F/E/X/D/P, and the original ref of U viaorigRef()). -
origRef
public long origRef()U only: the replaced (original) order reference. -
newRef
public long newRef()U only: the new order reference. -
side
public byte side()A/F/P:ItchCodec.BUYorItchCodec.SELL. -
stock
public long stock()A/F/P: symbol as 8 packed ASCII bytes (compare againstItchCodec.packStock(java.lang.String)). -
priceTick
public int priceTick()Price in 0.0001 ticks (A/F/P; U: the new price). Signed-int domain: wire prices above 2³¹−1 ticks decode negative (see the class doc's domain-limit note). -
matchNumber
public long matchNumber()E/P: the venue's match (execution) number.
-