Package deltix.qsrv.hf.blocks.booksim
Class BookPair
- java.lang.Object
-
- deltix.qsrv.hf.blocks.booksim.BookPair
-
- Direct Known Subclasses:
AggregatedBookPair
public class BookPair extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description BookPair(Level2Config config, ImmutableIXKey id)BookPair(Level2Config config, ImmutableIXKey id, int maxNumLevels)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearBooks()voidclearBooks(long timestamp, int nanosComponent)voidclearBooksAndSetInconsistent()Used by data connectors that receive a snapshot as a series of non-consecutive messages.voidclearBooksAndSetInconsistent(long timestamp, int nanosComponent)Used by data connectors that receive a snapshot as a series of non-consecutive messages.intgetBidNumOfOrders(int depth)doublegetBidPrice(int depth)doublegetBidSize(int depth)java.lang.ObjectgetCookie()intgetNumBidLevels()intgetNumOfferLevels()intgetOfferNumOfOrders(int depth)doublegetOfferPrice(int depth)doublegetOfferSize(int depth)booleanhasSnapshotBeenSent()booleanisBooksInconsistent()voidprocessIncrement(boolean isOffer, double price, double size)Some vendors do not support the depth/action concept, and require that the depth be found by price value.voidprocessIncrement(boolean isOffer, deltix.timebase.api.messages.BookUpdateAction action, int depth, double price, double size)voidprocessIncrement(long timestamp, int nanosComponent, boolean isOffer, double price, double size)voidprocessIncrement(long timestamp, int nanosComponent, boolean isOffer, double price, double size, int nOfOrders)Some vendors do not support the depth/action concept, and require that the depth be found by price value.voidprocessIncrement(long timestamp, int nanosComponent, boolean isOffer, deltix.timebase.api.messages.BookUpdateAction action, int depth, double price, double size)voidprocessIncrement(long timestamp, int nanosComponent, boolean isOffer, deltix.timebase.api.messages.BookUpdateAction action, int depth, double price, double size, int numOfOrders)voidprocessIncrement(deltix.timebase.api.messages.Level2Message msg)voidprocessLevel2Increment(deltix.timebase.api.messages.L2Message msg)voidprocessSnapshot(boolean isOffer, int numLevels, double[] prices, double[] sizes)voidprocessSnapshot(boolean isOffer, int numLevels, double[] prices, double[] sizes, int[] nOfOrders)voidprocessSnapshot(long timestamp, int nanosComponent, boolean isOffer, int numLevels, double[] prices, double[] sizes)voidprocessSnapshot(long timestamp, int nanosComponent, boolean isOffer, int numLevels, double[] prices, double[] sizes, int[] nOfOrders)voidprocessSnapshot(deltix.timebase.api.messages.L2SnapshotMessage msg)voidsendSnapshots(long timestamp, int nanosComponent)voidsetBooksConsistent()Used by data connectors that receive a snapshot as a series of non-consecutive messages.voidsetBooksConsistent(long timestamp, int nanosComponent)Used by data connectors that receive a snapshot as a series of non-consecutive messages.voidsetBooksConsistentNoSend()Set the books consistent.voidsetBooksInconsistent()Used by data connectors that receive a package of updates that could cause a crossing condition when applied.voidsetBooksInconsistent(boolean doSendIncrements)Used by data connectors that receive a package of updates that could cause a crossing condition when applied.voidsetCookie(java.lang.Object cookie)java.lang.StringtoString()
-
-
-
Constructor Detail
-
BookPair
public BookPair(Level2Config config, ImmutableIXKey id, int maxNumLevels)
-
BookPair
public BookPair(Level2Config config, ImmutableIXKey id)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
sendSnapshots
public void sendSnapshots(long timestamp, int nanosComponent)
-
clearBooks
public void clearBooks()
-
clearBooks
public void clearBooks(long timestamp, int nanosComponent)
-
isBooksInconsistent
public boolean isBooksInconsistent()
-
clearBooksAndSetInconsistent
public void clearBooksAndSetInconsistent()
Used by data connectors that receive a snapshot as a series of non-consecutive messages. It should be followed by a series of inserts or updates, and finallysetBooksConsistent()
-
clearBooksAndSetInconsistent
public void clearBooksAndSetInconsistent(long timestamp, int nanosComponent)Used by data connectors that receive a snapshot as a series of non-consecutive messages. It should be followed by a series of inserts or updates, and finallysetBooksConsistent()
-
setBooksInconsistent
public void setBooksInconsistent()
Used by data connectors that receive a package of updates that could cause a crossing condition when applied. Should be followed by a sequence of updates and, finally, a call tosetBooksConsistent()
-
setBooksInconsistent
public void setBooksInconsistent(boolean doSendIncrements)
Used by data connectors that receive a package of updates that could cause a crossing condition when applied. Should be followed by a sequence of updates and, finally, a call tosetBooksConsistent()
-
setBooksConsistent
public void setBooksConsistent()
Used by data connectors that receive a snapshot as a series of non-consecutive messages. It should be preceded byclearBooksAndSetInconsistent()and then a series of inserts or updates.
-
setBooksConsistent
public void setBooksConsistent(long timestamp, int nanosComponent)Used by data connectors that receive a snapshot as a series of non-consecutive messages. It should be preceded byclearBooksAndSetInconsistent()and then a series of inserts or updates.
-
setBooksConsistentNoSend
public void setBooksConsistentNoSend()
Set the books consistent. No any other actions.
-
processSnapshot
public void processSnapshot(boolean isOffer, int numLevels, double[] prices, double[] sizes)
-
processSnapshot
public void processSnapshot(boolean isOffer, int numLevels, double[] prices, double[] sizes, int[] nOfOrders)
-
processSnapshot
public void processSnapshot(long timestamp, int nanosComponent, boolean isOffer, int numLevels, double[] prices, double[] sizes)
-
processSnapshot
public void processSnapshot(long timestamp, int nanosComponent, boolean isOffer, int numLevels, double[] prices, double[] sizes, int[] nOfOrders)
-
processSnapshot
public void processSnapshot(deltix.timebase.api.messages.L2SnapshotMessage msg)
-
processIncrement
public void processIncrement(deltix.timebase.api.messages.Level2Message msg)
-
processLevel2Increment
public void processLevel2Increment(deltix.timebase.api.messages.L2Message msg)
-
processIncrement
public void processIncrement(boolean isOffer, double price, double size)Some vendors do not support the depth/action concept, and require that the depth be found by price value. Size = 0 causes the removal of a layer.
-
processIncrement
public void processIncrement(long timestamp, int nanosComponent, boolean isOffer, double price, double size)
-
processIncrement
public void processIncrement(long timestamp, int nanosComponent, boolean isOffer, double price, double size, int nOfOrders)Some vendors do not support the depth/action concept, and require that the depth be found by price value. Size = 0 causes the removal of a layer.
-
processIncrement
public void processIncrement(boolean isOffer, deltix.timebase.api.messages.BookUpdateAction action, int depth, double price, double size)
-
processIncrement
public void processIncrement(long timestamp, int nanosComponent, boolean isOffer, deltix.timebase.api.messages.BookUpdateAction action, int depth, double price, double size)
-
processIncrement
public void processIncrement(long timestamp, int nanosComponent, boolean isOffer, deltix.timebase.api.messages.BookUpdateAction action, int depth, double price, double size, int numOfOrders)
-
getNumBidLevels
public int getNumBidLevels()
-
getBidPrice
public double getBidPrice(int depth)
-
getBidSize
public double getBidSize(int depth)
-
getBidNumOfOrders
public int getBidNumOfOrders(int depth)
-
getNumOfferLevels
public int getNumOfferLevels()
-
getOfferPrice
public double getOfferPrice(int depth)
-
getOfferSize
public double getOfferSize(int depth)
-
getOfferNumOfOrders
public int getOfferNumOfOrders(int depth)
-
setCookie
public void setCookie(java.lang.Object cookie)
-
getCookie
public java.lang.Object getCookie()
-
hasSnapshotBeenSent
public boolean hasSnapshotBeenSent()
-
-