Interface MutableState<EventT,ResultT>
-
- All Superinterfaces:
java.io.Serializable
public interface MutableState<EventT,ResultT> extends java.io.SerializableMutable state mutates when events apply to it. It is stored in a Beam state.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidmutate(EventT event)The interface assumes that events will mutate the state without the possibility of throwing an error.ResultTproduceResult()This method is called after each state mutation.
-
-
-
Method Detail
-
mutate
void mutate(EventT event) throws java.lang.Exception
The interface assumes that events will mutate the state without the possibility of throwing an error.- Parameters:
event- to be processed- Throws:
java.lang.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.
-
-