use of org.apache.gobblin.runtime.api.JobCatalogListener in project incubator-gobblin by apache.
the class JobCatalogBase method addListener.
/**
*{@inheritDoc}
*/
@Override
public synchronized void addListener(JobCatalogListener jobListener) {
Preconditions.checkNotNull(jobListener);
this.listeners.addListener(jobListener);
if (state() == State.RUNNING) {
for (JobSpec jobSpec : getJobsWithTimeUpdate()) {
JobCatalogListener.AddJobCallback addJobCallback = new JobCatalogListener.AddJobCallback(jobSpec);
this.listeners.callbackOneListener(addJobCallback, jobListener);
}
}
}
Aggregations