public class ImmutableStateBinder extends Object implements StateBinder
StateBinder
used to deserialize the results returned by the
QueryableStateClient
.
The result is an immutable State
object containing the requested result.
Constructor and Description |
---|
ImmutableStateBinder(byte[] content) |
Modifier and Type | Method and Description |
---|---|
<IN,ACC,OUT> |
createAggregatingState(AggregatingStateDescriptor<IN,ACC,OUT> stateDesc)
Creates and returns a new
AggregatingState . |
<T,ACC> FoldingState<T,ACC> |
createFoldingState(FoldingStateDescriptor<T,ACC> stateDesc)
Creates and returns a new
FoldingState . |
<T> ListState<T> |
createListState(ListStateDescriptor<T> stateDesc)
Creates and returns a new
ListState . |
<MK,MV> MapState<MK,MV> |
createMapState(MapStateDescriptor<MK,MV> stateDesc)
Creates and returns a new
MapState . |
<T> ReducingState<T> |
createReducingState(ReducingStateDescriptor<T> stateDesc)
Creates and returns a new
ReducingState . |
<T> ValueState<T> |
createValueState(ValueStateDescriptor<T> stateDesc)
Creates and returns a new
ValueState . |
public <T> ValueState<T> createValueState(ValueStateDescriptor<T> stateDesc) throws Exception
StateBinder
ValueState
.createValueState
in interface StateBinder
T
- The type of the value that the ValueState
can store.stateDesc
- The StateDescriptor
that contains the name of the state.Exception
public <T> ListState<T> createListState(ListStateDescriptor<T> stateDesc) throws Exception
StateBinder
ListState
.createListState
in interface StateBinder
T
- The type of the values that the ListState
can store.stateDesc
- The StateDescriptor
that contains the name of the state.Exception
public <T> ReducingState<T> createReducingState(ReducingStateDescriptor<T> stateDesc) throws Exception
StateBinder
ReducingState
.createReducingState
in interface StateBinder
T
- The type of the values that the ReducingState
can store.stateDesc
- The StateDescriptor
that contains the name of the state.Exception
public <IN,ACC,OUT> AggregatingState<IN,OUT> createAggregatingState(AggregatingStateDescriptor<IN,ACC,OUT> stateDesc) throws Exception
StateBinder
AggregatingState
.createAggregatingState
in interface StateBinder
IN
- The type of the values that go into the aggregating stateACC
- The type of the values that are stored in the aggregating stateOUT
- The type of the values that come out of the aggregating statestateDesc
- The StateDescriptor
that contains the name of the state.Exception
public <T,ACC> FoldingState<T,ACC> createFoldingState(FoldingStateDescriptor<T,ACC> stateDesc) throws Exception
StateBinder
FoldingState
.createFoldingState
in interface StateBinder
T
- Type of the values folded into the stateACC
- Type of the value in the statestateDesc
- The StateDescriptor
that contains the name of the state.Exception
public <MK,MV> MapState<MK,MV> createMapState(MapStateDescriptor<MK,MV> stateDesc) throws Exception
StateBinder
MapState
.createMapState
in interface StateBinder
MK
- Type of the keys in the stateMV
- Type of the values in the statestateDesc
- The StateDescriptor
that contains the name of the state.Exception
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.