Class PersistentEventHandler
java.lang.Object
io.hypersistence.optimizer.core.event.persistence.PersistentEventHandler
- All Implemented Interfaces:
EventHandler
The
PersistentEventHandler is the EventHandler registered on the Config
when the event persistence feature is enabled.
It only handles runtime events, routing them to the RuntimeEventAggregator. Configuration
and mapping events are persisted separately, in a single batch, once scanning has finished (see
EventPersistenceContext.persistBootstrapEvents(java.lang.String, java.util.List<io.hypersistence.optimizer.core.event.Event>)), so they are skipped here to avoid
double writes.
Any failure is swallowed and logged: persisting events must never break the host application.
- Since:
- 2.14.0
- Author:
- Vlad Mihalcea
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PersistentEventHandler
-
-
Method Details
-
handle
Handle the incomingEvent.- Specified by:
handlein interfaceEventHandler- Parameters:
event- incomingEvent
-