Class PersistedJobStatusObserverImpl

java.lang.Object
com.netflix.genie.web.data.observers.PersistedJobStatusObserverImpl
All Implemented Interfaces:
PersistedJobStatusObserver

public class PersistedJobStatusObserverImpl extends 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 Details

    • PersistedJobStatusObserverImpl

      public PersistedJobStatusObserverImpl(GenieEventBus genieEventBus)
      Constructor.
      Parameters:
      genieEventBus - the genie event bus
  • Method Details

    • notify

      public void notify(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 interface PersistedJobStatusObserver
      Parameters:
      jobId - the job unique id
      previousStatus - the previous job status, or null if this job was just created and persisted
      currentStatus - the job status that was just persisted. Guaranteed to be different than the previous.