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
  • 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 future
    StrategyUpdateGenerator generator  
    java.lang.String generatorName  
    GeneratedEventInfo[] info  
    boolean isAdd
    Generator will be added if true
    Removed if false
    boolean isAggregatable
    Description of classes and aggregation rulles of all events that this generator can generated and want to store in data structure
    boolean 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 history
    java.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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • isAdd

      public final boolean isAdd
      Generator will be added if true
      Removed if false
    • shouldReceiveHistory

      public final 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 history
    • shouldReceiveBackfilledData

      public final boolean 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. You might have to re-register generator in response to Layer1ApiHistoricalDataLoadedMessage
    • generator

      public final StrategyUpdateGenerator generator
    • strategyClass

      public final java.lang.Class<?> strategyClass
    • generatorName

      public final java.lang.String generatorName
    • fullName

      public final 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 future
    • info

      public final GeneratedEventInfo[] info
    • isAggregatable

      public final boolean isAggregatable
      Description 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 generator
      generatorName - inner name of generator (should be unique within strategy)
      isAdd - true if generator is to be added, false if generator is to be removed
      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 history
      shouldReceiveBackfilledData - receive data that is backfilled after initial instrument. See shouldReceiveBackfilledData
      generator - generator to add/remove
      info - 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)