Package deltix.qsrv.hf.tickdb.pub
Class StreamConfigurationHelper
- java.lang.Object
-
- deltix.qsrv.hf.tickdb.pub.StreamConfigurationHelper
-
public class StreamConfigurationHelper extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static RecordClassDescriptor
BINARY_MESSAGE_DESCRIPTOR
static int
BS_NO_BAR_SIZE
Returned when bar message descriptor does not contain the barSize field.static RecordClassDescriptor
DATA_LOSS_MESSAGE_DESCRIPTOR
static RecordClassDescriptor
ERROR_MESSAGE_DESCRIPTOR
static RecordClassDescriptor
META_DATA_CHANGE_MESSAGE_DESCRIPTOR
static RecordClassDescriptor
REAL_TIME_START_MESSAGE_DESCRIPTOR
static RecordClassDescriptor
SPACE_CREATE_MESSAGE_DESCRIPTOR
static RecordClassDescriptor
SPACE_DELETE_MESSAGE_DESCRIPTOR
static RecordClassDescriptor
SPACE_RENAME_MESSAGE_DESCRIPTOR
static RecordClassDescriptor
STREAM_TRUNCATED_MESSAGE_DESCRIPTOR
-
Constructor Summary
Constructors Constructor Description StreamConfigurationHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
containsBarMessagesOnly(TickStream stream)
static boolean
containsBBOMessagesOnly(TickStream stream)
static boolean
containsMarketMessagesOnly(TickStream stream)
static boolean
containsMarketMessagesOnly(TickStream... streams)
static boolean
containsSubclassesOnly(RecordClassDescriptor[] rcds, java.lang.Class<?> cls)
static boolean
containsSubclassesOnly(RecordClassDescriptor[] rcds, java.lang.String newPath, java.lang.String oldPath)
static boolean
containsSubclassesOnly(TickStream stream, java.lang.Class<?> cls)
static boolean
containsTradeMessagesOnly(TickStream stream)
static MessageDecoder<deltix.qsrv.hf.pub.InstrumentMessage>
createBoundDecoder(CodecFactory codecFactory, deltix.qsrv.hf.pub.InstrumentType instrumentType, java.lang.String symbol, TypeLoader loader, RecordClassDescriptor[] types)
static MessageEncoder<deltix.qsrv.hf.pub.InstrumentMessage>
createBoundEncoder(CodecFactory codecFactory, deltix.qsrv.hf.pub.InstrumentType instrumentType, java.lang.String symbol, TypeLoader loader, RecordClassDescriptor[] types)
static MessageDecoder<RawMessage>
createRawDecoder(deltix.qsrv.hf.pub.InstrumentType instrumentType, java.lang.String symbol, RecordClassDescriptor[] types)
static MessageEncoder<RawMessage>
createRawEncoder(deltix.qsrv.hf.pub.InstrumentType instrumentType, java.lang.String symbol, RecordClassDescriptor[] types)
static DXChannel<deltix.qsrv.hf.pub.InstrumentMessage>
getChannel(DXTickDB db, java.lang.String key)
static RecordClassDescriptor[]
getClassDescriptors(DXTickStream stream)
static deltix.util.time.Interval
getPeriodicity(DXChannel channel)
static boolean
isFixedBuiltIn(TickStream stream, java.lang.Class<?> cls)
static boolean
mayContainBarMessages(TickStream stream)
static boolean
mayContainBBOMessages(TickStream stream)
static boolean
mayContainL2Descriptors(TickStream stream)
static boolean
mayContainLevel2Messages(TickStream stream)
static boolean
mayContainSubclasses(DXChannel channel, java.lang.Class<?> cls)
static boolean
mayContainSubclasses(TickStream stream, java.lang.Class<?> cls)
static boolean
mayContainSubclasses(TickStream stream, java.lang.Class<?>... cls)
static boolean
mayContainTradeMessages(TickStream stream)
static RecordClassDescriptor
mkBarMessageDescriptor(RecordClassDescriptor marketMsgDescriptor, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, java.lang.String priceEncoding, java.lang.String sizeEncoding)
static RecordClassDescriptor
mkBBOMessageDescriptor(RecordClassDescriptor marketMsgDescriptor, java.lang.Boolean isNational, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, java.lang.String priceEncoding, java.lang.String sizeEncoding)
static RecordClassDescriptor
mkEventMessageDescriptor()
static RecordClassDescriptor
mkExchangeDescriptor()
static DataField
mkField(java.lang.String name, java.lang.String title, DataType type, java.lang.String relativeTo, java.lang.Object staticValue)
static RecordClassDescriptor
mkL2SnapshotMessageDescriptor(RecordClassDescriptor marketMsgDescriptor, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, java.lang.String priceEncoding, java.lang.String sizeEncoding)
static RecordClassDescriptor
mkLevel2ActionDescriptor(java.lang.String priceEncoding, java.lang.String sizeEncoding)
static RecordClassDescriptor
mkLevel2IncrementMessageDescriptor(RecordClassDescriptor marketMsgDescriptor, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, RecordClassDescriptor level2ActionDescriptor)
static RecordClassDescriptor
mkLevel2MessageDescriptor(RecordClassDescriptor marketMsgDescriptor, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, java.lang.String priceEncoding, java.lang.String sizeEncoding)
static RecordClassDescriptor
mkMarketMessageDescriptor(java.lang.Integer staticCurrencyCode)
static RecordClassDescriptor
mkMarketMessageDescriptor(java.lang.Integer staticCurrencyCode, boolean staticOriginalTimestamp)
static RecordClassDescriptor
mkMarketMessageDescriptor(java.lang.Integer staticCurrencyCode, java.lang.Boolean staticOriginalTimestamp, java.lang.Boolean staticNanoTime)
Builds RecordClassDescriptor for standard message class MarketMessagestatic RecordClassDescriptor
mkMarketMsgSubclassDescriptor(RecordClassDescriptor marketMsgDescriptor, java.lang.String name, java.lang.Integer staticCurrencyCode, DataField[] fields)
static RecordClassDescriptor
mkPacketEndMessageDescriptor(RecordClassDescriptor parentMsgDescriptor, java.lang.String name, java.lang.String description, DataField[] fields)
static RecordClassDescriptor[]
mkSecurityMetaInfoDescriptors()
static RecordClassDescriptor
mkTradeMessageDescriptor(RecordClassDescriptor marketMsgDescriptor, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, java.lang.String priceEncoding, java.lang.String sizeEncoding)
static RecordClassDescriptor[]
mkTradingCalendarDescriptors()
static RecordClassDescriptor
mkTradingSessionDescriptor()
static RecordClassDescriptor
mkUniversalBarMessageDescriptor()
static RecordClassDescriptor
mkUniversalBBOMessageDescriptor()
static RecordClassDescriptor
mkUniversalDescriptor(java.lang.Class<?> cls)
static RecordClassDescriptor[]
mkUniversalMarketDescriptors()
static RecordClassDescriptor[]
mkUniversalMarketDescriptors(deltix.timebase.api.MarketMessageType[] types)
static RecordClassDescriptor
mkUniversalTradeMessageDescriptor()
static void
setBar(DXTickStream stream, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, deltix.util.time.Interval periodicity)
static void
setBar(DXTickStream stream, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, deltix.util.time.Interval periodicity, java.lang.String priceEncoding, java.lang.String sizeEncoding)
static void
setBarNoExchNoCur(DXTickStream stream, deltix.util.time.Interval periodicity)
static void
setBBO(DXTickStream stream, java.lang.Boolean isNational, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode)
static void
setBBO(DXTickStream stream, java.lang.Boolean isNational, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, java.lang.String priceEncoding, java.lang.String sizeEncoding)
static void
setBBONoExchNoCur(DXTickStream stream)
static void
setBBOOrBar(DXTickStream stream, java.lang.Boolean isNational, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode)
static void
setFromTemplate(DXTickStream stream, DXTickStream template)
static void
setMeta(DXTickStream stream)
static void
setTrade(DXTickStream stream, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode)
static void
setTrade(DXTickStream stream, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, java.lang.String priceEncoding, java.lang.String sizeEncoding)
static void
setTradeNoExchNoCur(DXTickStream stream)
static void
setTradeOrBar(DXTickStream stream, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode)
static void
setTradeOrBBO(DXTickStream stream, java.lang.Boolean isNational, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode)
static void
setTradeOrBBO(DXTickStream stream, java.lang.Boolean isNational, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, java.lang.String priceEncoding, java.lang.String sizeEncoding)
static void
setTradeOrBBOOrBar(DXTickStream stream, java.lang.Boolean isNational, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode)
static void
setUniversalMarket(DXTickStream stream)
-
-
-
Field Detail
-
BS_NO_BAR_SIZE
public static final int BS_NO_BAR_SIZE
Returned when bar message descriptor does not contain the barSize field.- See Also:
- Constant Field Values
-
DATA_LOSS_MESSAGE_DESCRIPTOR
public static final RecordClassDescriptor DATA_LOSS_MESSAGE_DESCRIPTOR
-
STREAM_TRUNCATED_MESSAGE_DESCRIPTOR
public static final RecordClassDescriptor STREAM_TRUNCATED_MESSAGE_DESCRIPTOR
-
SPACE_RENAME_MESSAGE_DESCRIPTOR
public static final RecordClassDescriptor SPACE_RENAME_MESSAGE_DESCRIPTOR
-
SPACE_DELETE_MESSAGE_DESCRIPTOR
public static final RecordClassDescriptor SPACE_DELETE_MESSAGE_DESCRIPTOR
-
SPACE_CREATE_MESSAGE_DESCRIPTOR
public static final RecordClassDescriptor SPACE_CREATE_MESSAGE_DESCRIPTOR
-
META_DATA_CHANGE_MESSAGE_DESCRIPTOR
public static final RecordClassDescriptor META_DATA_CHANGE_MESSAGE_DESCRIPTOR
-
REAL_TIME_START_MESSAGE_DESCRIPTOR
public static final RecordClassDescriptor REAL_TIME_START_MESSAGE_DESCRIPTOR
-
BINARY_MESSAGE_DESCRIPTOR
public static final RecordClassDescriptor BINARY_MESSAGE_DESCRIPTOR
-
ERROR_MESSAGE_DESCRIPTOR
public static final RecordClassDescriptor ERROR_MESSAGE_DESCRIPTOR
-
-
Method Detail
-
mkField
public static DataField mkField(java.lang.String name, java.lang.String title, DataType type, java.lang.String relativeTo, java.lang.Object staticValue)
-
mkMarketMessageDescriptor
public static RecordClassDescriptor mkMarketMessageDescriptor(java.lang.Integer staticCurrencyCode)
-
mkMarketMessageDescriptor
public static RecordClassDescriptor mkMarketMessageDescriptor(java.lang.Integer staticCurrencyCode, boolean staticOriginalTimestamp)
-
mkMarketMessageDescriptor
public static RecordClassDescriptor mkMarketMessageDescriptor(java.lang.Integer staticCurrencyCode, java.lang.Boolean staticOriginalTimestamp, java.lang.Boolean staticNanoTime)
Builds RecordClassDescriptor for standard message class MarketMessage- Parameters:
staticOriginalTimestamp
- Controls MarketMessage.originalTimestamp: passnull
to omit this field, true if you want to make this fields static, false otherwise.staticNanoTime
- Controls MarketMessage.nanoTime: passnull
to omit this field, true if you want to make this fields static, false otherwise.
-
mkMarketMsgSubclassDescriptor
public static RecordClassDescriptor mkMarketMsgSubclassDescriptor(RecordClassDescriptor marketMsgDescriptor, java.lang.String name, java.lang.Integer staticCurrencyCode, DataField[] fields)
-
mkEventMessageDescriptor
public static RecordClassDescriptor mkEventMessageDescriptor()
-
mkBarMessageDescriptor
public static RecordClassDescriptor mkBarMessageDescriptor(RecordClassDescriptor marketMsgDescriptor, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, java.lang.String priceEncoding, java.lang.String sizeEncoding)
-
mkTradeMessageDescriptor
public static RecordClassDescriptor mkTradeMessageDescriptor(RecordClassDescriptor marketMsgDescriptor, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, java.lang.String priceEncoding, java.lang.String sizeEncoding)
-
mkPacketEndMessageDescriptor
public static RecordClassDescriptor mkPacketEndMessageDescriptor(RecordClassDescriptor parentMsgDescriptor, java.lang.String name, java.lang.String description, DataField[] fields)
-
mkBBOMessageDescriptor
public static RecordClassDescriptor mkBBOMessageDescriptor(RecordClassDescriptor marketMsgDescriptor, java.lang.Boolean isNational, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, java.lang.String priceEncoding, java.lang.String sizeEncoding)
-
mkLevel2MessageDescriptor
public static RecordClassDescriptor mkLevel2MessageDescriptor(RecordClassDescriptor marketMsgDescriptor, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, java.lang.String priceEncoding, java.lang.String sizeEncoding)
-
mkLevel2ActionDescriptor
public static RecordClassDescriptor mkLevel2ActionDescriptor(java.lang.String priceEncoding, java.lang.String sizeEncoding)
-
mkLevel2IncrementMessageDescriptor
public static RecordClassDescriptor mkLevel2IncrementMessageDescriptor(RecordClassDescriptor marketMsgDescriptor, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, RecordClassDescriptor level2ActionDescriptor)
-
mkL2SnapshotMessageDescriptor
public static RecordClassDescriptor mkL2SnapshotMessageDescriptor(RecordClassDescriptor marketMsgDescriptor, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, java.lang.String priceEncoding, java.lang.String sizeEncoding)
-
setBarNoExchNoCur
public static void setBarNoExchNoCur(DXTickStream stream, deltix.util.time.Interval periodicity)
-
setBar
public static void setBar(DXTickStream stream, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, deltix.util.time.Interval periodicity)
-
setBar
public static void setBar(DXTickStream stream, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, deltix.util.time.Interval periodicity, java.lang.String priceEncoding, java.lang.String sizeEncoding)
-
setTradeNoExchNoCur
public static void setTradeNoExchNoCur(DXTickStream stream)
-
setTrade
public static void setTrade(DXTickStream stream, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode)
-
setTrade
public static void setTrade(DXTickStream stream, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, java.lang.String priceEncoding, java.lang.String sizeEncoding)
-
setBBONoExchNoCur
public static void setBBONoExchNoCur(DXTickStream stream)
-
setBBO
public static void setBBO(DXTickStream stream, java.lang.Boolean isNational, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode)
-
setBBO
public static void setBBO(DXTickStream stream, java.lang.Boolean isNational, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, java.lang.String priceEncoding, java.lang.String sizeEncoding)
-
setTradeOrBBO
public static void setTradeOrBBO(DXTickStream stream, java.lang.Boolean isNational, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode)
-
setTradeOrBBO
public static void setTradeOrBBO(DXTickStream stream, java.lang.Boolean isNational, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode, java.lang.String priceEncoding, java.lang.String sizeEncoding)
-
setFromTemplate
public static void setFromTemplate(DXTickStream stream, DXTickStream template)
-
mkUniversalTradeMessageDescriptor
public static RecordClassDescriptor mkUniversalTradeMessageDescriptor()
-
mkUniversalBarMessageDescriptor
public static RecordClassDescriptor mkUniversalBarMessageDescriptor()
-
mkUniversalBBOMessageDescriptor
public static RecordClassDescriptor mkUniversalBBOMessageDescriptor()
-
mkUniversalDescriptor
public static RecordClassDescriptor mkUniversalDescriptor(java.lang.Class<?> cls)
-
mkUniversalMarketDescriptors
public static RecordClassDescriptor[] mkUniversalMarketDescriptors(deltix.timebase.api.MarketMessageType[] types)
-
mkUniversalMarketDescriptors
public static RecordClassDescriptor[] mkUniversalMarketDescriptors()
-
setUniversalMarket
public static void setUniversalMarket(DXTickStream stream)
-
containsSubclassesOnly
public static boolean containsSubclassesOnly(RecordClassDescriptor[] rcds, java.lang.Class<?> cls)
-
containsSubclassesOnly
public static boolean containsSubclassesOnly(RecordClassDescriptor[] rcds, java.lang.String newPath, java.lang.String oldPath)
-
containsSubclassesOnly
public static boolean containsSubclassesOnly(TickStream stream, java.lang.Class<?> cls)
-
containsMarketMessagesOnly
public static boolean containsMarketMessagesOnly(TickStream... streams)
-
containsMarketMessagesOnly
public static boolean containsMarketMessagesOnly(TickStream stream)
-
isFixedBuiltIn
public static boolean isFixedBuiltIn(TickStream stream, java.lang.Class<?> cls)
-
mayContainSubclasses
public static boolean mayContainSubclasses(TickStream stream, java.lang.Class<?> cls)
-
mayContainSubclasses
public static boolean mayContainSubclasses(TickStream stream, java.lang.Class<?>... cls)
-
mayContainSubclasses
public static boolean mayContainSubclasses(DXChannel channel, java.lang.Class<?> cls)
-
containsTradeMessagesOnly
public static boolean containsTradeMessagesOnly(TickStream stream)
-
containsBBOMessagesOnly
public static boolean containsBBOMessagesOnly(TickStream stream)
-
containsBarMessagesOnly
public static boolean containsBarMessagesOnly(TickStream stream)
-
mayContainTradeMessages
public static boolean mayContainTradeMessages(TickStream stream)
-
mayContainLevel2Messages
public static boolean mayContainLevel2Messages(TickStream stream)
-
mayContainL2Descriptors
public static boolean mayContainL2Descriptors(TickStream stream)
-
mayContainBBOMessages
public static boolean mayContainBBOMessages(TickStream stream)
-
mayContainBarMessages
public static boolean mayContainBarMessages(TickStream stream)
-
getClassDescriptors
public static RecordClassDescriptor[] getClassDescriptors(DXTickStream stream)
-
getPeriodicity
public static deltix.util.time.Interval getPeriodicity(DXChannel channel)
-
getChannel
public static DXChannel<deltix.qsrv.hf.pub.InstrumentMessage> getChannel(DXTickDB db, java.lang.String key)
-
createBoundEncoder
public static MessageEncoder<deltix.qsrv.hf.pub.InstrumentMessage> createBoundEncoder(CodecFactory codecFactory, deltix.qsrv.hf.pub.InstrumentType instrumentType, java.lang.String symbol, TypeLoader loader, RecordClassDescriptor[] types)
-
createBoundDecoder
public static MessageDecoder<deltix.qsrv.hf.pub.InstrumentMessage> createBoundDecoder(CodecFactory codecFactory, deltix.qsrv.hf.pub.InstrumentType instrumentType, java.lang.String symbol, TypeLoader loader, RecordClassDescriptor[] types)
-
createRawEncoder
public static MessageEncoder<RawMessage> createRawEncoder(deltix.qsrv.hf.pub.InstrumentType instrumentType, java.lang.String symbol, RecordClassDescriptor[] types)
-
createRawDecoder
public static MessageDecoder<RawMessage> createRawDecoder(deltix.qsrv.hf.pub.InstrumentType instrumentType, java.lang.String symbol, RecordClassDescriptor[] types)
-
setTradeOrBBOOrBar
public static void setTradeOrBBOOrBar(DXTickStream stream, java.lang.Boolean isNational, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode)
-
setBBOOrBar
public static void setBBOOrBar(DXTickStream stream, java.lang.Boolean isNational, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode)
-
setTradeOrBar
public static void setTradeOrBar(DXTickStream stream, java.lang.String staticExchangeCode, java.lang.Integer staticCurrencyCode)
-
setMeta
public static void setMeta(DXTickStream stream)
-
mkSecurityMetaInfoDescriptors
public static RecordClassDescriptor[] mkSecurityMetaInfoDescriptors()
-
mkTradingCalendarDescriptors
public static RecordClassDescriptor[] mkTradingCalendarDescriptors()
-
mkTradingSessionDescriptor
public static RecordClassDescriptor mkTradingSessionDescriptor()
-
mkExchangeDescriptor
public static RecordClassDescriptor mkExchangeDescriptor()
-
-