use of org.apache.gobblin.runtime.api.SpecCatalogListener in project incubator-gobblin by apache.
the class TopologyCatalog method addListener.
@Override
public void addListener(SpecCatalogListener specListener) {
Preconditions.checkNotNull(specListener);
this.listeners.addListener(specListener);
if (state() == Service.State.RUNNING) {
for (Spec spec : getSpecs()) {
SpecCatalogListener.AddSpecCallback addJobCallback = new SpecCatalogListener.AddSpecCallback(spec);
this.listeners.callbackOneListener(addJobCallback, specListener);
}
}
}
use of org.apache.gobblin.runtime.api.SpecCatalogListener in project incubator-gobblin by apache.
the class FlowCatalog method addListener.
@Override
public void addListener(SpecCatalogListener specListener) {
Preconditions.checkNotNull(specListener);
this.listeners.addListener(specListener);
if (state() == State.RUNNING) {
for (Spec spec : getSpecsWithTimeUpdate()) {
SpecCatalogListener.AddSpecCallback addJobCallback = new SpecCatalogListener.AddSpecCallback(spec);
this.listeners.callbackOneListener(addJobCallback, specListener);
}
}
}
Aggregations