Interface MutableState<EventT,ResultT>
- All Superinterfaces:
Serializable
Mutable state mutates when events apply to it. It is stored in a Beam state.
-
Method Summary
Modifier and TypeMethodDescriptionvoidThe interface assumes that events will mutate the state without the possibility of throwing an error.This method is called after each state mutation.
-
Method Details
-
mutate
The interface assumes that events will mutate the state without the possibility of throwing an error.- Parameters:
event- to be processed- Throws:
Exception- if a checked exception is thrown, the event will be output intoOrderedEventProcessorResult.unprocessedEvents()with
-
produceResult
ResultT produceResult()This method is called after each state mutation.- Returns:
- Result of the processing. Can be null if nothing needs to be output after this mutation.
-