use of org.opendaylight.controller.cluster.datastore.compat.LegacyDOMStoreAdapter in project controller by opendaylight.
the class DistributedOperationalDataStoreProviderModule method createInstance.
@Override
public java.lang.AutoCloseable createInstance() {
// The DistributedOperDataStore is provided via blueprint so wait for and return it here for
// backwards compatibility
WaitingServiceTracker<DistributedDataStoreInterface> tracker = WaitingServiceTracker.create(DistributedDataStoreInterface.class, bundleContext, "(type=distributed-operational)");
DistributedDataStoreInterface delegate = tracker.waitForService(WaitingServiceTracker.FIVE_MINUTES);
return new LegacyDOMStoreAdapter(delegate) {
@Override
public void close() {
tracker.close();
}
};
}
use of org.opendaylight.controller.cluster.datastore.compat.LegacyDOMStoreAdapter in project controller by opendaylight.
the class DistributedConfigDataStoreProviderModule method createInstance.
@Override
public AutoCloseable createInstance() {
// The DistributedConfigDataStore is provided via blueprint so wait for and return it here for
// backwards compatibility.
WaitingServiceTracker<DistributedDataStoreInterface> tracker = WaitingServiceTracker.create(DistributedDataStoreInterface.class, bundleContext, "(type=distributed-config)");
DistributedDataStoreInterface delegate = tracker.waitForService(WaitingServiceTracker.FIVE_MINUTES);
return new LegacyDOMStoreAdapter(delegate) {
@Override
public void close() {
tracker.close();
}
};
}
Aggregations