Package deltix.qsrv.hf.blocks.l2
Class DefaultBook<COOKIE>
- java.lang.Object
-
- deltix.qsrv.hf.blocks.l2.DefaultBook<COOKIE>
-
- All Implemented Interfaces:
Book<COOKIE>
,ConcurrentBook<COOKIE>
,deltix.qsrv.hf.pub.InstrumentIdentity
,deltix.util.lang.CookieContainer<COOKIE>
public class DefaultBook<COOKIE> extends java.lang.Object implements ConcurrentBook<COOKIE>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description COOKIE
getCookie()
rtmath.containers.BinaryArray
getEntitlementId()
java.lang.CharSequence
getExchange()
long
getExchangeCode()
deltix.qsrv.hf.pub.InstrumentType
getInstrumentType()
BookItem
getItem(int index, boolean ask)
long
getLastUpdateTimestamp()
Returns time of last updateint
getSize(boolean ask)
Returns number of order book items on specific side (bid or ask) of order bookjava.lang.CharSequence
getSymbol()
boolean
hasEntitlementId()
void
lock()
void
setCookie(COOKIE userObject)
void
unlock()
void
walk(BookWalker walker)
Iterate current order book using provided callbackvoid
walk(BookWalker walker, boolean ask)
Iterate one side of order book using provided callbackvoid
walk(BookWalker walker, BookWalker.Direction direction)
Iterate current order book using provided callback
-
-
-
Method Detail
-
getLastUpdateTimestamp
public long getLastUpdateTimestamp()
Description copied from interface:Book
Returns time of last update- Specified by:
getLastUpdateTimestamp
in interfaceBook<COOKIE>
- Returns:
- time in millis
-
hasEntitlementId
public boolean hasEntitlementId()
- Specified by:
hasEntitlementId
in interfaceBook<COOKIE>
- Returns:
- true if market data has data-access-control (DAC)
-
getEntitlementId
public rtmath.containers.BinaryArray getEntitlementId()
- Specified by:
getEntitlementId
in interfaceBook<COOKIE>
- Returns:
- market data has data-access-control (DAC) token that was used to build this order book
-
getSymbol
public java.lang.CharSequence getSymbol()
- Specified by:
getSymbol
in interfacedeltix.qsrv.hf.pub.InstrumentIdentity
-
getInstrumentType
public deltix.qsrv.hf.pub.InstrumentType getInstrumentType()
- Specified by:
getInstrumentType
in interfacedeltix.qsrv.hf.pub.InstrumentIdentity
-
getExchange
public java.lang.CharSequence getExchange()
- Specified by:
getExchange
in interfaceBook<COOKIE>
- Returns:
- Exchange or Liquidity Provider name that broadcasts this order book
-
getExchangeCode
public long getExchangeCode()
- Specified by:
getExchangeCode
in interfaceBook<COOKIE>
- Returns:
- encoded exchange name of the exchange or liquidity provider that broadcasts this order book. See
ExchangeCodec
-
getSize
public int getSize(boolean ask)
Description copied from interface:Book
Returns number of order book items on specific side (bid or ask) of order book
-
getItem
public BookItem getItem(int index, boolean ask)
-
lock
public void lock() throws java.lang.InterruptedException
- Specified by:
lock
in interfaceConcurrentBook<COOKIE>
- Throws:
java.lang.InterruptedException
-
unlock
public void unlock()
- Specified by:
unlock
in interfaceConcurrentBook<COOKIE>
-
getCookie
public COOKIE getCookie()
- Specified by:
getCookie
in interfacedeltix.util.lang.CookieContainer<COOKIE>
-
setCookie
public void setCookie(COOKIE userObject)
- Specified by:
setCookie
in interfacedeltix.util.lang.CookieContainer<COOKIE>
-
walk
public void walk(BookWalker walker)
Description copied from interface:Book
Iterate current order book using provided callback
-
walk
public void walk(BookWalker walker, BookWalker.Direction direction)
Description copied from interface:Book
Iterate current order book using provided callback
-
walk
public void walk(BookWalker walker, boolean ask)
Description copied from interface:Book
Iterate one side of order book using provided callback
-
-