InputT
- the type of values added to the stateOutputT
- the type of value extracted from the state@Experimental(value=STATE) public interface GroupingState<InputT,OutputT> extends ReadableState<OutputT>, State
ReadableState
cell that combines multiple input values and outputs a single value of a
different type.
This generalizes GroupByKey
and Combine
styles of grouping.
Modifier and Type | Method and Description |
---|---|
void |
add(InputT value)
Add a value to the buffer.
|
ReadableState<java.lang.Boolean> |
isEmpty()
Returns a
ReadableState whose ReadableState.read() method will return true if this state is
empty at the point when that ReadableState.read() call returns. |
GroupingState<InputT,OutputT> |
readLater()
Indicate that the value will be read later.
|
read
void add(InputT value)
Elements added will not be reflected in OutputT
objects returned by
previous calls to ReadableState.read()
.
ReadableState<java.lang.Boolean> isEmpty()
ReadableState
whose ReadableState.read()
method will return true if this state is
empty at the point when that ReadableState.read()
call returns.GroupingState<InputT,OutputT> readLater()
ReadableState
This allows an implementation to start an asynchronous prefetch or to include this state in the next batch of reads.
readLater
in interface ReadableState<OutputT>