Package org.apache.beam.sdk.state
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 Summary
Modifier and TypeMethodDescriptionvoid
clearRange
(Instant minTimestamp, Instant limitTimestamp) Clear a timestamp-limited subrange of the list.Read a timestamp-limited subrange of the list.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.Methods inherited from interface org.apache.beam.sdk.state.GroupingState
add, isEmpty, readLater
Methods inherited from interface org.apache.beam.sdk.state.ReadableState
read
-
Method Details
-
readRange
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
Clear a timestamp-limited subrange of the list.All values with timestamps >= minTimestamp and invalid input: '<' limitTimestamp will be removed from the list.
-
readRangeLater
Call to indicate that a specific range will be read from the list, allowing runners to batch multiple range reads.
-