Interface Layer1ApiDynamicHistoryListener.SnapshotState<T extends com.bookmap.api.Aggregation,E extends DynamicHistoryEvent>

Enclosing interface:
Layer1ApiDynamicHistoryListener

public static interface Layer1ApiDynamicHistoryListener.SnapshotState<T extends com.bookmap.api.Aggregation,E extends DynamicHistoryEvent>
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    buildEventFromDelta(long timeFrom, long timeTo, T aggregation, double currentSizeIncrement, double targetSizeIncrement)
    Builds a Bookmap event for a single historical block from a delta aggregation, using the snapshot state accumulated from previous blocks.
  • Method Details

    • buildEventFromDelta

      E buildEventFromDelta(long timeFrom, long timeTo, T aggregation, double currentSizeIncrement, double targetSizeIncrement)
      Builds a Bookmap event for a single historical block from a delta aggregation, using the snapshot state accumulated from previous blocks.
      Parameters:
      timeFrom - start of the block's time window, in nanoseconds (inclusive)
      timeTo - end of the block's time window, in nanoseconds (exclusive)
      aggregation - the block's delta aggregation
      currentSizeIncrement - the size increment the stored data is in
      targetSizeIncrement - the size increment the produced event should be in
      Returns:
      the event for this block; its timeFrom/timeTo should be the given window
    • applyAggregationToSnapshot

      void applyAggregationToSnapshot(T aggregation)