Interface OrderedListState<T>

All Superinterfaces:
GroupingState<TimestampedValue<T>,Iterable<TimestampedValue<T>>>, ReadableState<Iterable<TimestampedValue<T>>>, State

public interface OrderedListState<T> extends GroupingState<TimestampedValue<T>,Iterable<TimestampedValue<T>>>
A ReadableState cell containing a list of values sorted by timestamp. Timestamped values can be added to the list, and subranges can be read out in order. Subranges of the list can be deleted as well.
  • Method Details

    • readRange

      Iterable<TimestampedValue<T>> readRange(Instant minTimestamp, Instant limitTimestamp)
      Read a timestamp-limited subrange of the list. The result is ordered by timestamp.

      All values with timestamps >= minTimestamp and invalid input: '<' limitTimestamp will be in the resuling iterable. This means that only timestamps strictly less than Instant.ofEpochMilli(Long.MAX_VALUE) can be used as timestamps.

    • clearRange

      void clearRange(Instant minTimestamp, Instant limitTimestamp)
      Clear a timestamp-limited subrange of the list.

      All values with timestamps >= minTimestamp and invalid input: '<' limitTimestamp will be removed from the list.

    • readRangeLater

      OrderedListState<T> readRangeLater(Instant minTimestamp, Instant limitTimestamp)
      Call to indicate that a specific range will be read from the list, allowing runners to batch multiple range reads.