Package velox.api.layer1.messages
Class Layer1ApiUserMessageAddStrategyUpdateGenerator
java.lang.Object
velox.api.layer1.messages.Layer1ApiUserMessageAddStrategyUpdateGenerator
- All Implemented Interfaces:
Layer1ApiIgnorableUpwardMessage
public class Layer1ApiUserMessageAddStrategyUpdateGenerator extends java.lang.Object implements Layer1ApiIgnorableUpwardMessage
Used to add/remove custom update generators
Important note: when generator is added with this message, custom events will be generated for past history
This can take some time, and it is done synchronously in thread that was used to send message
You might want to invalidate current indicators once you receive control after sending this message
Important note: when generator is added with this message, custom events will be generated for past history
This can take some time, and it is done synchronously in thread that was used to send message
You might want to invalidate current indicators once you receive control after sending this message
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
fullName
Name of data structure that will hold updates from this generator
This is corresponding to name of data structure holding this information and should be used to retrieve information in futureStrategyUpdateGenerator
generator
java.lang.String
generatorName
GeneratedEventInfo[]
info
boolean
isAdd
Generator will be added if true
Removed if falseboolean
isAggregatable
Description of classes and aggregation rulles of all events that this generator can generated and want to store in data structureboolean
shouldReceiveBackfilledData
If true it will receive data that is backfilled after initial instrument subscription is established, but only if data is already in the data structures by the moment generator is running.boolean
shouldReceiveHistory
If true, loading this generator in replay mode will stop playing until
all data from beginning is played to this generator so it could generate complete historyjava.lang.Class<?>
strategyClass
-
Constructor Summary
Constructors Constructor Description Layer1ApiUserMessageAddStrategyUpdateGenerator(java.lang.Class<?> strategyClass, java.lang.String generatorName, boolean isAdd, boolean shouldReceiveHistory, boolean shouldReceiveBackfilledData, StrategyUpdateGenerator generator, GeneratedEventInfo[] info)
Layer1ApiUserMessageAddStrategyUpdateGenerator(java.lang.Class<?> strategyClass, java.lang.String generatorName, boolean isAdd, boolean shouldReceiveHistory, StrategyUpdateGenerator generator, GeneratedEventInfo[] info)
-
Method Summary
-
Field Details
-
isAdd
public final boolean isAddGenerator will be added if true
Removed if false -
shouldReceiveHistory
public final boolean shouldReceiveHistoryIf true, loading this generator in replay mode will stop playing until
all data from beginning is played to this generator so it could generate complete history -
shouldReceiveBackfilledData
public final boolean shouldReceiveBackfilledDataIf true it will receive data that is backfilled after initial instrument subscription is established, but only if data is already in the data structures by the moment generator is running. You might have to re-register generator in response to Layer1ApiHistoricalDataLoadedMessage -
generator
-
strategyClass
public final java.lang.Class<?> strategyClass -
generatorName
public final java.lang.String generatorName -
fullName
public final java.lang.String fullNameName of data structure that will hold updates from this generator
This is corresponding to name of data structure holding this information and should be used to retrieve information in future -
info
-
isAggregatable
public final boolean isAggregatableDescription of classes and aggregation rulles of all events that this generator can generated and want to store in data structure
-
-
Constructor Details
-
Layer1ApiUserMessageAddStrategyUpdateGenerator
public Layer1ApiUserMessageAddStrategyUpdateGenerator(java.lang.Class<?> strategyClass, java.lang.String generatorName, boolean isAdd, boolean shouldReceiveHistory, boolean shouldReceiveBackfilledData, StrategyUpdateGenerator generator, GeneratedEventInfo[] info)- Parameters:
strategyClass
- class of strategy that is creating generatorgeneratorName
- inner name of generator (should be unique within strategy)isAdd
- true if generator is to be added, false if generator is to be removedshouldReceiveHistory
- if true, loading this generator in replay mode will stop playing until all data from beginning is played to this generator so it could generate complete historyshouldReceiveBackfilledData
- receive data that is backfilled after initial instrument. SeeshouldReceiveBackfilledData
generator
- generator to add/removeinfo
- description of classes and aggregation rules of all events that this generator can generated and want to store in data structure
Condition should be met: all events are either aggregatable (with provided aggregator class), or non aggregatable
If you need both type, register 2 separate generators
All listed events are stored in same tree, so time of request for one or for all of them at once will be roughly the same
NOTE: any event class can not be used by multiple generators
-
Layer1ApiUserMessageAddStrategyUpdateGenerator
public Layer1ApiUserMessageAddStrategyUpdateGenerator(java.lang.Class<?> strategyClass, java.lang.String generatorName, boolean isAdd, boolean shouldReceiveHistory, StrategyUpdateGenerator generator, GeneratedEventInfo[] info)
-