Class JobEntityListener
java.lang.Object
com.netflix.genie.web.data.services.impl.jpa.listeners.JobEntityListener
Listener for Job JPA entity (
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.
- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionJobEntityListener(PersistedJobStatusObserver persistedJobStatusObserver) Constructor. -
Method Summary
-
Constructor Details
-
JobEntityListener
Constructor.- Parameters:
persistedJobStatusObserver- the observer to notify of persisted job status changes
-
-
Method Details
-
jobUpdate
Persistence callback invoked after a job entity has been committed/flushed into persistent storage. If the persisted status of the job is different from the last one notified, then a notification is emitted.- Parameters:
jobEntity- the job that was just persisted
-
jobLoad
Persistence callback invoked after a job entity is loaded or refreshed. The job status loaded from persistent storage is also the last state that was notified.- Parameters:
jobEntity- the job that was just loaded
-