Class AggregatedLevel2Processor

  • All Implemented Interfaces:
    BookPairHolder

    public class AggregatedLevel2Processor
    extends java.lang.Object
    implements BookPairHolder
    Using in multi-thread context:
     final AggregatedLevel2Processor processor = ...;
     
     // one thread
     AggregatedBookPair pair = processor.getOrCreateBookPair(...);
     synchronized (pair.getAggregatedBookPairs()) {
          pair.doSomething();
     }
     
     // another thread
     AggregatedBookPairs aggBooks = processor.getAggregatedBookPairs(...);
     synchronized (aggBooks) {
          aggBooks.doSomething();
     }
     
    • Constructor Detail

      • AggregatedLevel2Processor

        public AggregatedLevel2Processor​(Level2Config config)
      • AggregatedLevel2Processor

        public AggregatedLevel2Processor​(Level2Config config,
                                         int capacity)
    • Method Detail

      • getOrCreateBookPair

        public BookPair getOrCreateBookPair​(deltix.timebase.api.messages.L2SnapshotMessage msg)
      • getOrCreateBookPair

        public BookPair getOrCreateBookPair​(deltix.timebase.api.messages.Level2Message msg)
      • getOrCreateBookPair

        public BookPair getOrCreateBookPair​(deltix.timebase.api.messages.L2Message msg)
      • getOrCreateBookPair

        public BookPair getOrCreateBookPair​(java.lang.CharSequence exchangeCode,
                                            java.lang.CharSequence symbol,
                                            deltix.qsrv.hf.pub.InstrumentType type)
        Specified by:
        getOrCreateBookPair in interface BookPairHolder
      • getOrCreateBookPair

        public BookPair getOrCreateBookPair​(java.lang.CharSequence exchangeCode,
                                            java.lang.CharSequence symbol,
                                            deltix.qsrv.hf.pub.InstrumentType type,
                                            int maxNumLevels)
      • processMessage

        public void processMessage​(deltix.qsrv.hf.pub.InstrumentMessage msg)
      • 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)
      • processIncrementSafe

        public void processIncrementSafe​(deltix.timebase.api.messages.Level2Message msg)
      • getOrCreateAggregatedBookPairs

        public AggregatedBookPairs getOrCreateAggregatedBookPairs​(java.lang.CharSequence symbol,
                                                                  deltix.qsrv.hf.pub.InstrumentType type)
      • clear

        public void clear()