use of org.checkerframework.checker.lock.qual.Holding in project bgpcep by opendaylight.
the class EffectiveRibInWriter method changeDataTree.
@Holding("this")
private void changeDataTree(final DOMDataTreeWriteTransaction tx, final YangInstanceIdentifier rootPath, final DataTreeCandidateNode root, final DataTreeCandidateNode table) {
final PathArgument lastArg = table.getIdentifier();
verify(lastArg instanceof NodeIdentifierWithPredicates, "Unexpected type %s in path %s", lastArg.getClass(), rootPath);
final NodeIdentifierWithPredicates tableKey = (NodeIdentifierWithPredicates) lastArg;
final RIBSupportContext ribContext = this.registry.getRIBSupportContext(tableKey);
if (ribContext == null) {
LOG.warn("Table {} is not supported, ignoring event", tableKey);
return;
}
final YangInstanceIdentifier effectiveTablePath = effectiveTablePath(tableKey);
final ModificationType modificationType = root.getModificationType();
LOG.debug("Effective table {} modification type {}", effectiveTablePath, modificationType);
switch(modificationType) {
case DISAPPEARED:
case DELETE:
deleteTable(tx, ribContext, effectiveTablePath, table);
break;
case APPEARED:
case WRITE:
writeTable(tx, ribContext, effectiveTablePath, table);
break;
case SUBTREE_MODIFIED:
modifyTable(tx, ribContext, effectiveTablePath, table);
break;
case UNMODIFIED:
LOG.info("Ignoring spurious notification on {} data {}", rootPath, table);
break;
default:
LOG.warn("Ignoring unhandled root {}", table);
break;
}
}
Aggregations