Package velox.api.layer1.dynamichistory
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 TypeMethodDescriptionvoidapplyAggregationToSnapshot(T aggregation) 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 aggregationcurrentSizeIncrement- the size increment the stored data is intargetSizeIncrement- the size increment the produced event should be in- Returns:
- the event for this block; its
timeFrom/timeToshould be the given window
-
applyAggregationToSnapshot
-