Package velox.api.layer1.messages
Class Layer1ApiUserMessageAddStrategyUpdateGenerator
java.lang.Object
velox.api.layer1.messages.Layer1ApiUserMessageAddStrategyUpdateGenerator
- All Implemented Interfaces:
velox.api.layer1.messages.Layer1ApiIgnorableUpwardMessage
public class Layer1ApiUserMessageAddStrategyUpdateGenerator
extends Object
implements velox.api.layer1.messages.Layer1ApiIgnorableUpwardMessage
Used to add/remove custom update generators
Important: use
When generator is added with this message, custom events will be generated for past history - this can take some time.
Important: use
sendUserMessage when sending from Layer1Attachable,
Layer1SimpleAttachable or Layer1Injectable but use
onUserMessage from
Layer1UpstreamDataEditor When generator is added with this message, custom events will be generated for past history - this can take some time.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringName 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 futurefinal StrategyUpdateGeneratorfinal Stringfinal GeneratedEventInfo[]final booleanGenerator will be added if true
Removed if falsefinal booleanDescription of classes and aggregation rulles of all events that this generator can generated and want to store in data structurefinal booleanIndicates whether this generator requests the entire available history or only since instrument was subscribed.final booleanIndicates whether this generator requests historical data.
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 historyfinal Class<?> -
Constructor Summary
ConstructorsConstructorDescriptionLayer1ApiUserMessageAddStrategyUpdateGenerator(Class<?> strategyClass, String generatorName, boolean isAdd, boolean shouldReceiveHistory, boolean shouldReceiveBackfilledData, StrategyUpdateGenerator generator, GeneratedEventInfo[] info) Layer1ApiUserMessageAddStrategyUpdateGenerator(Class<?> strategyClass, 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 shouldReceiveHistoryIndicates whether this generator requests historical data.
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 history -
shouldReceiveBackfilledData
public final boolean shouldReceiveBackfilledDataIndicates whether this generator requests the entire available history or only since instrument was subscribed.
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. You might have to re-register generator in response to Layer1ApiHistoricalDataLoadedMessage.
This flag works in conjunction withshouldReceiveHistoryand it will be ignored ifshouldReceiveHistoryis false -
generator
-
strategyClass
-
generatorName
-
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 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(Class<?> strategyClass, 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- indicates whether this generator requests historical data. SeeshouldReceiveHistoryshouldReceiveBackfilledData- receives data that is backfilled after initial instrument. SeeshouldReceiveBackfilledDatagenerator- 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(Class<?> strategyClass, String generatorName, boolean isAdd, boolean shouldReceiveHistory, StrategyUpdateGenerator generator, GeneratedEventInfo[] info)
-