use of org.opendaylight.mdsal.dom.schema.osgi.OSGiModuleInfoSnapshot in project mdsal by opendaylight.
the class OSGiDOMSchemaService method bindSnapshot.
@Reference(policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY)
void bindSnapshot(final OSGiModuleInfoSnapshot newContext) {
LOG.info("Updating context to generation {}", newContext.getGeneration());
final ModuleInfoSnapshot snapshot = newContext.getService();
final EffectiveModelContext ctx = snapshot.getEffectiveModelContext();
final ModuleInfoSnapshot previous = currentSnapshot.getAndSet(snapshot);
LOG.debug("Snapshot updated from {} to {}", previous, snapshot);
listeners.forEach(listener -> notifyListener(ctx, listener));
}
Aggregations