Class EventAppliers
java.lang.Object
io.camunda.zeebe.engine.state.appliers.EventAppliers
- All Implemented Interfaces:
EventApplier
Applies state changes from events to the
MutableProcessingState
.
Finds the correct TypedEventApplier
and delegates.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.camunda.zeebe.engine.state.EventApplier
EventApplier.NoSuchEventApplier
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyState
(long key, Intent intent, RecordValue value, int recordVersion) Apply the state changes of the given event.int
getLatestVersion
(Intent intent) Returns the latest EventApplier version of a given Intent.
-
Field Details
-
NOOP_EVENT_APPLIER
-
-
Constructor Details
-
EventAppliers
public EventAppliers()
-
-
Method Details
-
registerEventAppliers
-
getLatestVersion
Description copied from interface:EventApplier
Returns the latest EventApplier version of a given Intent.- Specified by:
getLatestVersion
in interfaceEventApplier
- Parameters:
intent
- the Intent of the EventApplier- Returns:
- the latest version of the given intent, -1 if no EventApplier is found
-
applyState
public void applyState(long key, Intent intent, RecordValue value, int recordVersion) throws EventApplier.NoSuchEventApplier Description copied from interface:EventApplier
Apply the state changes of the given event. It will use the event applier that matches the specified version.- Specified by:
applyState
in interfaceEventApplier
- Parameters:
key
- the key of the eventintent
- the intent of the eventvalue
- the value of the eventrecordVersion
- the record version of the event- Throws:
EventApplier.NoSuchEventApplier
- if no event applier is found for the given intent and record version. The event is not applied and it is up to the caller to decide what to do.
-