T - The type of the operator state.public class OperatorState<T> extends Object implements Serializable
| Constructor and Description |
|---|
OperatorState(T initialState)
Initializes the state using the given state object.
|
| Modifier and Type | Method and Description |
|---|---|
StateCheckpoint<T> |
checkpoint()
Creates a
StateCheckpoint that will be used to backup the state
for failure recovery. |
T |
getState()
Returns the currently stored state object.
|
boolean |
stateEquals(OperatorState<T> other) |
String |
toString() |
void |
update(Object stateUpdate)
Updates the current state object.
|
public OperatorState(T initialState)
initialState - The initial state objectpublic T getState()
public void update(Object stateUpdate)
stateUpdate - The update applied.public StateCheckpoint<T> checkpoint()
StateCheckpoint that will be used to backup the state
for failure recovery. This method will be called by the state
checkpointer.StateCheckpoint created.public boolean stateEquals(OperatorState<T> other)
Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.