import java.util.LinkedHashMap;
import java.util.Map;
+import javax.annotation.concurrent.GuardedBy;
+
import org.opendaylight.yangtools.concepts.Identifiable;
import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
private final Map<PathArgument, NodeModification> childModification;
+ @GuardedBy("this")
private boolean sealed = false;
protected NodeModification(final PathArgument identifier, final Optional<StoreMetadataNode> original) {
this.value = value;
}
+ @GuardedBy("this")
private void checkSealed() {
checkState(!sealed, "Node Modification is sealed. No further changes allowed.");
}
return !childModification.isEmpty();
}
- public void updateModificationType(final ModificationType type) {
+ @GuardedBy("this")
+ private void updateModificationType(final ModificationType type) {
modificationType = type;
clearSnapshot();
}