Class PersistedJobStatusObserverImpl
- java.lang.Object
-
- com.netflix.genie.web.data.observers.PersistedJobStatusObserverImpl
-
- All Implemented Interfaces:
PersistedJobStatusObserver
public class PersistedJobStatusObserverImpl extends java.lang.Object implements PersistedJobStatusObserver
Observer of persisted entities modifications that publishes events on the event bus to be consumed asynchronously by interested consumers.- Since:
- 4.0.0
-
-
Constructor Summary
Constructors Constructor Description PersistedJobStatusObserverImpl(GenieEventBus genieEventBus)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
notify(java.lang.String jobId, JobStatus previousStatus, JobStatus currentStatus)
Handle a notification of job status change after the latter was successfully committed to persistent storage.
-
-
-
Constructor Detail
-
PersistedJobStatusObserverImpl
public PersistedJobStatusObserverImpl(GenieEventBus genieEventBus)
Constructor.- Parameters:
genieEventBus
- the genie event bus
-
-
Method Detail
-
notify
public void notify(java.lang.String jobId, @Nullable JobStatus previousStatus, JobStatus currentStatus)
Handle a notification of job status change after the latter was successfully committed to persistent storage.- Specified by:
notify
in interfacePersistedJobStatusObserver
- Parameters:
jobId
- the job unique idpreviousStatus
- the previous job status, or null if this job was just created and persistedcurrentStatus
- the job status that was just persisted. Guaranteed to be different than the previous.
-
-