import org.opendaylight.infrautils.metrics.Meter;
import org.opendaylight.infrautils.metrics.MetricDescriptor;
import org.opendaylight.infrautils.metrics.MetricProvider;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.elan.l2gw.ha.HwvtepHAUtil;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepGlobalAugmentation;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation;
@Override
public void onDataTreeChanged(final Collection<DataTreeModification<Node>> changes) {
- HAJobScheduler.getInstance().submitJob(() -> ListenableFutures.addErrorLogging(
+ HAJobScheduler.getInstance().submitJob(() -> LoggingFutures.addErrorLogging(
txRunner.callWithNewReadWriteTransactionAndSubmit(datastoreType, tx -> {
processConnectedNodes(changes, tx);
processUpdatedNodes(changes, tx);
onGlobalNodeUpdate(key, updated, original, mod, tx);
subMod = change.getRootNode().getModifiedAugmentation(HwvtepGlobalAugmentation.class);
} else {
- onPsNodeUpdate(updated, original, mod, tx);
+ onPsNodeUpdate(updated, mod, tx);
subMod = change.getRootNode().getModifiedAugmentation(PhysicalSwitchAugmentation.class);
}
if (subMod != null) {
}
private String logicalSwitchNameFromChildMod(DataObjectModification<? extends DataObject> childMod) {
- DataObject data = childMod.getDataAfter() != null ? childMod.getDataAfter() : childMod.getDataBefore();
+ DataObject dataAfter = childMod.getDataAfter();
+ DataObject data = dataAfter != null ? dataAfter : childMod.getDataBefore();
return LOGICAL_SWITCH_EXTRACTOR.getOrDefault(childMod.getModificationType().getClass(), noLogicalSwitch)
.apply(data);
}
}
- void onPsNodeUpdate(Node updated, Node original,
+ void onPsNodeUpdate(Node updated,
DataObjectModification<Node> mod, TypedReadWriteTransaction<D> tx)
throws ReadFailedException, InterruptedException, ExecutionException {