Interface DataStructureInterface
public interface DataStructureInterface
Interface used by strategies to interact with data structure
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic classTree structure response for given interval -
Method Summary
Modifier and TypeMethodDescriptionget(long t0, long intervalWidth, int intervalNumber, String alias, DataStructureInterface.StandardEvents[] interestedEvents) Query for standard events Returns list, containing aggregation from start time to t0 exclusive, followed by list of aggregations for the interval [t0, t0 + intervalWidth * intervalNumbers), divided by intervalNumber partsget(long t1, String alias, DataStructureInterface.StandardEvents[] interestedEvents) Similar toget(long, long, int, String, StandardEvents[])but returns a single aggregation from the first event to t1.get(Class<?> strategyClass, String generatorName, long t0, long intervalWidth, int intervalNumber, String alias, Class<?>[] customEvents) Query for custom events.Query for custom events.List<? extends CustomGeneratedEvent> Similar toget(Class, String, long, long, int, String, Class[])but returns a single aggregation from the first event to t1.
-
Method Details
-
get
ArrayList<DataStructureInterface.TreeResponseInterval> get(long t0, long intervalWidth, int intervalNumber, String alias, DataStructureInterface.StandardEvents[] interestedEvents) Query for standard events Returns list, containing aggregation from start time to t0 exclusive, followed by list of aggregations for the interval [t0, t0 + intervalWidth * intervalNumbers), divided by intervalNumber parts- Parameters:
t0- start time (inclusive)intervalWidth-intervalNumber-alias-interestedEvents- array of standard tree events that should be returned- Returns:
- 0th element is aggregation from start time to t0 exclusive elements 1 to intervalNumber are aggregations of following intervals
-
get
List<DataStructureInterface.TreeResponseInterval> get(Class<?> strategyClass, String generatorName, long t0, long intervalWidth, int intervalNumber, String alias, Class<?>[] customEvents) Query for custom events. All events in this request must be generated by the same generator, owned by this strategy. If you need events from more then 1 generator, do multiple gets Returns list, containing aggregation from start time to t0 exclusive, followed by list of aggregations for the interval [t0, t0 + intervalWidth * intervalNumbers), divided by intervalNumber parts- Parameters:
strategyClass- class of strategy that owns generatorgeneratorName- name of generator that generated events (same as one given toLayer1ApiUserMessageAddStrategyUpdateGenerator) constructort0- start time (inclusive)intervalWidth-intervalNumber-alias-customEvents- array of value classes (provided inGeneratedEventInfo.valueClass) for custom events you want to retrieve- Returns:
- 0th element is aggregation from start time to t0 exclusive elements 1 to intervalNumber are aggregations of following intervals
-
get
List<Object> get(Class<?> strategyClass, String generatorName, long t0, long t1, String alias) throws IllegalArgumentException Query for custom events. Returns all events in range [t0, t1), generated by this generator- Parameters:
strategyClass- class of strategy that owns generatorgeneratorName- name of generator that generated events (same as one given toLayer1ApiUserMessageAddStrategyUpdateGenerator) constructort0- start time (inclusive)t1- end time (exclusive)alias-- Returns:
- list of events, created by generator in time range [-inf, t1]. Events are sorted in order they were generated
and have ascending
CustomGeneratedEvent.getTime() - Throws:
IllegalArgumentException- if this generator uses aggregated events
-
get
DataStructureInterface.TreeResponseInterval get(long t1, String alias, DataStructureInterface.StandardEvents[] interestedEvents) Similar toget(long, long, int, String, StandardEvents[])but returns a single aggregation from the first event to t1. [-inf, t1]- Parameters:
t1-alias-interestedEvents- array of standard tree events that should be returned- Returns:
- aggregation [-inf, t1] for given events
-
get
DataStructureInterface.TreeResponseInterval get(Class<?> strategyClass, String generatorName, long t1, String alias, Class<?>[] customEvents) Similar toget(Class, String, long, long, int, String, Class[])but returns a single aggregation from the first event to t1. [-inf, t1]- Parameters:
strategyClass- class of strategy that owns generatorgeneratorName- name of generator that generated events (same as one given toLayer1ApiUserMessageAddStrategyUpdateGenerator) constructort1-alias-customEvents- array of value classes (provided inGeneratedEventInfo.valueClass) for custom events you want to retrieve- Returns:
- aggregation [-inf, t1] for given events
-
get
List<? extends CustomGeneratedEvent> get(Class<?> strategyClass, String generatorName, long t1, String alias) throws IllegalArgumentException - Parameters:
strategyClass- class of strategy that owns generatorgeneratorName- name of generator that generated events (same as one given toLayer1ApiUserMessageAddStrategyUpdateGenerator) constructort1-alias-- Returns:
- list of events, created by generator in time range [-inf, t1]. Events are sorted in order they were generated
and have ascending
CustomGeneratedEvent.getTime() - Throws:
IllegalArgumentException- if this generator uses aggregated events
-