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 COOKIEgetCookie()rtmath.containers.BinaryArraygetEntitlementId()java.lang.CharSequencegetExchange()longgetExchangeCode()deltix.qsrv.hf.pub.InstrumentTypegetInstrumentType()BookItemgetItem(int index, boolean ask)longgetLastUpdateTimestamp()Returns time of last updateintgetSize(boolean ask)Returns number of order book items on specific side (bid or ask) of order bookjava.lang.CharSequencegetSymbol()booleanhasEntitlementId()voidlock()voidsetCookie(COOKIE userObject)voidunlock()voidwalk(BookWalker walker)Iterate current order book using provided callbackvoidwalk(BookWalker walker, boolean ask)Iterate one side of order book using provided callbackvoidwalk(BookWalker walker, BookWalker.Direction direction)Iterate current order book using provided callback
-
-
-
Method Detail
-
getLastUpdateTimestamp
public long getLastUpdateTimestamp()
Description copied from interface:BookReturns time of last update- Specified by:
getLastUpdateTimestampin interfaceBook<COOKIE>- Returns:
- time in millis
-
hasEntitlementId
public boolean hasEntitlementId()
- Specified by:
hasEntitlementIdin interfaceBook<COOKIE>- Returns:
- true if market data has data-access-control (DAC)
-
getEntitlementId
public rtmath.containers.BinaryArray getEntitlementId()
- Specified by:
getEntitlementIdin 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:
getSymbolin interfacedeltix.qsrv.hf.pub.InstrumentIdentity
-
getInstrumentType
public deltix.qsrv.hf.pub.InstrumentType getInstrumentType()
- Specified by:
getInstrumentTypein interfacedeltix.qsrv.hf.pub.InstrumentIdentity
-
getExchange
public java.lang.CharSequence getExchange()
- Specified by:
getExchangein interfaceBook<COOKIE>- Returns:
- Exchange or Liquidity Provider name that broadcasts this order book
-
getExchangeCode
public long getExchangeCode()
- Specified by:
getExchangeCodein 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:BookReturns 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:
lockin interfaceConcurrentBook<COOKIE>- Throws:
java.lang.InterruptedException
-
unlock
public void unlock()
- Specified by:
unlockin interfaceConcurrentBook<COOKIE>
-
getCookie
public COOKIE getCookie()
- Specified by:
getCookiein interfacedeltix.util.lang.CookieContainer<COOKIE>
-
setCookie
public void setCookie(COOKIE userObject)
- Specified by:
setCookiein interfacedeltix.util.lang.CookieContainer<COOKIE>
-
walk
public void walk(BookWalker walker)
Description copied from interface:BookIterate current order book using provided callback
-
walk
public void walk(BookWalker walker, BookWalker.Direction direction)
Description copied from interface:BookIterate current order book using provided callback
-
walk
public void walk(BookWalker walker, boolean ask)
Description copied from interface:BookIterate one side of order book using provided callback
-
-