Class Timeranges


public class Timeranges extends Object
Bundle class of multiple Timeranges.Timerange. Used to get the timeranges to resend data from.

All Timeranges.Timerange inside a Timeranges are separated by the MAX_CONCAT_TIME. When inserting a new timestamp the timestamp gets inserted to the nearest Timeranges.Timerange or if the nearest one is more than the MAX_CONCAT_TIME away a new Timeranges.Timerange gets inserted in the current Timeranges.

Usage example:

 final var timeranges = timedata.getResendTimeranges([CHANNEL_ADDRESS], [LAST_RESEND_TIMESTAMP]);
 for (var timerange : timeranges.maxDataInTime([MAX_RESEND_TIMESPAN_SECONDS])) {
        final var from = timerange.getMinTimestamp();
        final var to = timerange.getMaxTimestamp();
        ...fetch resend data
        ...send data
See Also: