Class ArtificialStateBuilder<T>
- java.lang.Object
-
- org.apache.flink.streaming.tests.artificialstate.builder.ArtificialStateBuilder<T>
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ArtificialListStateBuilder
,ArtificialMapStateBuilder
,ArtificialValueStateBuilder
public abstract class ArtificialStateBuilder<T> extends Object implements Serializable
The state builder wraps the logic of registering state in user functions, as well as how state is updated per input element..- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
artificialStateForElement(T element)
Manipulate the state for an input element.String
getStateName()
abstract void
initialize(FunctionInitializationContext initializationContext)
Registers the state.
-
-
-
Method Detail
-
getStateName
public String getStateName()
-
artificialStateForElement
public abstract void artificialStateForElement(T element) throws Exception
Manipulate the state for an input element.- Parameters:
element
- the current input element.- Throws:
Exception
-
initialize
public abstract void initialize(FunctionInitializationContext initializationContext) throws Exception
Registers the state.- Parameters:
initializationContext
- the state initialization context, provided by the user function.- Throws:
Exception
-
-