Class BookPair

  • Direct Known Subclasses:
    AggregatedBookPair

    public class BookPair
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clearBooks()  
      void clearBooks​(long timestamp, int nanosComponent)  
      void clearBooksAndSetInconsistent()
      Used by data connectors that receive a snapshot as a series of non-consecutive messages.
      void clearBooksAndSetInconsistent​(long timestamp, int nanosComponent)
      Used by data connectors that receive a snapshot as a series of non-consecutive messages.
      int getBidNumOfOrders​(int depth)  
      double getBidPrice​(int depth)  
      double getBidSize​(int depth)  
      java.lang.Object getCookie()  
      int getNumBidLevels()  
      int getNumOfferLevels()  
      int getOfferNumOfOrders​(int depth)  
      double getOfferPrice​(int depth)  
      double getOfferSize​(int depth)  
      boolean hasSnapshotBeenSent()  
      boolean isBooksInconsistent()  
      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.
      void processIncrement​(boolean isOffer, deltix.timebase.api.messages.BookUpdateAction action, int depth, double price, double size)  
      void processIncrement​(long timestamp, int nanosComponent, boolean isOffer, double price, double size)  
      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.
      void processIncrement​(long timestamp, int nanosComponent, boolean isOffer, deltix.timebase.api.messages.BookUpdateAction action, int depth, double price, double size)  
      void processIncrement​(long timestamp, int nanosComponent, boolean isOffer, deltix.timebase.api.messages.BookUpdateAction action, int depth, double price, double size, int numOfOrders)  
      void processIncrement​(deltix.timebase.api.messages.Level2Message msg)  
      void processLevel2Increment​(deltix.timebase.api.messages.L2Message msg)  
      void processSnapshot​(boolean isOffer, int numLevels, double[] prices, double[] sizes)  
      void processSnapshot​(boolean isOffer, int numLevels, double[] prices, double[] sizes, int[] nOfOrders)  
      void processSnapshot​(long timestamp, int nanosComponent, boolean isOffer, int numLevels, double[] prices, double[] sizes)  
      void processSnapshot​(long timestamp, int nanosComponent, boolean isOffer, int numLevels, double[] prices, double[] sizes, int[] nOfOrders)  
      void processSnapshot​(deltix.timebase.api.messages.L2SnapshotMessage msg)  
      void sendSnapshots​(long timestamp, int nanosComponent)  
      void setBooksConsistent()
      Used by data connectors that receive a snapshot as a series of non-consecutive messages.
      void setBooksConsistent​(long timestamp, int nanosComponent)
      Used by data connectors that receive a snapshot as a series of non-consecutive messages.
      void setBooksConsistentNoSend()
      Set the books consistent.
      void setBooksInconsistent()
      Used by data connectors that receive a package of updates that could cause a crossing condition when applied.
      void setBooksInconsistent​(boolean doSendIncrements)
      Used by data connectors that receive a package of updates that could cause a crossing condition when applied.
      void setCookie​(java.lang.Object cookie)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.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 finally setBooksConsistent()
      • 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 finally setBooksConsistent()
      • 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 to setBooksConsistent()
      • 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 to setBooksConsistent()
      • setBooksConsistent

        public void setBooksConsistent()
        Used by data connectors that receive a snapshot as a series of non-consecutive messages. It should be preceded by clearBooksAndSetInconsistent() 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 by clearBooksAndSetInconsistent() 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()