@Experimental(value=STATE) public interface OrderedListState<T> extends GroupingState<TimestampedValue<T>,java.lang.Iterable<TimestampedValue<T>>>
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.Modifier and Type | Method and Description |
---|---|
void |
clearRange(Instant minTimestamp,
Instant limitTimestamp)
Clear a timestamp-limited subrange of the list.
|
java.lang.Iterable<TimestampedValue<T>> |
readRange(Instant minTimestamp,
Instant limitTimestamp)
Read a timestamp-limited subrange of the list.
|
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.
|
add, isEmpty, readLater
read
java.lang.Iterable<TimestampedValue<T>> readRange(Instant minTimestamp, Instant limitTimestamp)
All values with timestamps >= minTimestamp and < 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.
void clearRange(Instant minTimestamp, Instant limitTimestamp)
All values with timestamps >= minTimestamp and < limitTimestamp will be removed from the list.
OrderedListState<T> readRangeLater(Instant minTimestamp, Instant limitTimestamp)