Package deltix.qsrv.hf.blocks
Class EquitiesRunTimeDataBase<EquityStateType extends InstrumentState>
- java.lang.Object
-
- deltix.qsrv.hf.blocks.EquitiesRunTimeDataBase<EquityStateType>
-
- Direct Known Subclasses:
OptionsRunTimeDataBase
public class EquitiesRunTimeDataBase<EquityStateType extends InstrumentState> extends java.lang.Object
A run-time database capable of holing information about equities. Provides extremely fast lookup capability. This class can be extended to add fields to the objects it can hold, as well as to hold additional types objects.
This class is not thread-safe
-
-
Constructor Summary
Constructors Constructor Description EquitiesRunTimeDataBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearAll()
Clear the entire database.protected EquityStateType
createEquityState(java.lang.String symbol)
Override to create a subclass of InstrumentState.java.util.Collection<EquityStateType>
equities()
Returns a read-only collection of all equity states.EquityStateType
getEquityState(java.lang.CharSequence symbol)
Look up an equity state by symbol.EquityStateType
getOrCreateEquityState(java.lang.CharSequence symbol)
Look up an equity state by symbol, or add one to database if it does not exist.void
setSubscription(EntityAndTypeSubscriptionController subscription)
-
-
-
Method Detail
-
equities
public final java.util.Collection<EquityStateType> equities()
Returns a read-only collection of all equity states.
-
setSubscription
public void setSubscription(EntityAndTypeSubscriptionController subscription)
-
createEquityState
protected EquityStateType createEquityState(java.lang.String symbol)
Override to create a subclass of InstrumentState.
-
clearAll
public void clearAll()
Clear the entire database.
-
getEquityState
public final EquityStateType getEquityState(java.lang.CharSequence symbol)
Look up an equity state by symbol.- Parameters:
symbol
- The ticker- Returns:
- Equity state object, or
null
if not found.
-
getOrCreateEquityState
public final EquityStateType getOrCreateEquityState(java.lang.CharSequence symbol)
Look up an equity state by symbol, or add one to database if it does not exist.- Parameters:
symbol
- The ticker- Returns:
- Equity state object.
-
-