Package deltix.qsrv.hf.blocks.booksim
Class AggregatedLevel2Processor
- java.lang.Object
-
- deltix.qsrv.hf.blocks.booksim.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 Summary
Constructors Constructor Description AggregatedLevel2Processor(Level2Config config)
AggregatedLevel2Processor(Level2Config config, int capacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
AggregatedBookPairs
getOrCreateAggregatedBookPairs(java.lang.CharSequence symbol, deltix.qsrv.hf.pub.InstrumentType type)
BookPair
getOrCreateBookPair(deltix.timebase.api.messages.L2Message msg)
BookPair
getOrCreateBookPair(deltix.timebase.api.messages.L2SnapshotMessage msg)
BookPair
getOrCreateBookPair(deltix.timebase.api.messages.Level2Message msg)
BookPair
getOrCreateBookPair(java.lang.CharSequence exchangeCode, java.lang.CharSequence symbol, deltix.qsrv.hf.pub.InstrumentType type)
BookPair
getOrCreateBookPair(java.lang.CharSequence exchangeCode, java.lang.CharSequence symbol, deltix.qsrv.hf.pub.InstrumentType type, int maxNumLevels)
void
processIncrement(deltix.timebase.api.messages.Level2Message msg)
void
processIncrementSafe(deltix.timebase.api.messages.Level2Message msg)
void
processLevel2Increment(deltix.timebase.api.messages.L2Message msg)
void
processMessage(deltix.qsrv.hf.pub.InstrumentMessage msg)
void
processSnapshot(deltix.timebase.api.messages.L2SnapshotMessage msg)
-
-
-
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 interfaceBookPairHolder
-
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()
-
-