public class JobEntityListener
extends java.lang.Object
JobEntity
).
Currently tracks persistent changes to the status of a job and notifies an observer.
Could be extended to do proxy more persist changes.
N.B. Spring configuration.
- This class does not appear in any AutoConfiguration as bean.
It is referenced as EventListener
by JobEntity
.
EntityManager creates it even if a bean of the same type exists already.
- The constructor parameter persistedJobStatusObserver
is marked Nullable
so that an instance can be
created even if no bean of that type is configured.
Constructor and Description |
---|
JobEntityListener(PersistedJobStatusObserver persistedJobStatusObserver)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
jobLoad(JobEntity jobEntity)
Persistence callback invoked after a job entity is loaded or refreshed.
|
void |
jobUpdate(JobEntity jobEntity)
Persistence callback invoked after a job entity has been committed/flushed into persistent storage.
|
public JobEntityListener(PersistedJobStatusObserver persistedJobStatusObserver)
persistedJobStatusObserver
- the observer to notify of persisted job status changespublic void jobUpdate(JobEntity jobEntity)
jobEntity
- the job that was just persistedpublic void jobLoad(JobEntity jobEntity)
jobEntity
- the job that was just loaded