Search in sources :

Example 1 with SpecCatalogListener

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);
        }
    }
}
Also used : SpecCatalogListener(org.apache.gobblin.runtime.api.SpecCatalogListener) TopologySpec(org.apache.gobblin.runtime.api.TopologySpec) Spec(org.apache.gobblin.runtime.api.Spec) FlowSpec(org.apache.gobblin.runtime.api.FlowSpec)

Example 2 with SpecCatalogListener

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);
        }
    }
}
Also used : SpecCatalogListener(org.apache.gobblin.runtime.api.SpecCatalogListener) Spec(org.apache.gobblin.runtime.api.Spec) FlowSpec(org.apache.gobblin.runtime.api.FlowSpec)

Aggregations

FlowSpec (org.apache.gobblin.runtime.api.FlowSpec)2 Spec (org.apache.gobblin.runtime.api.Spec)2 SpecCatalogListener (org.apache.gobblin.runtime.api.SpecCatalogListener)2 TopologySpec (org.apache.gobblin.runtime.api.TopologySpec)1