- public void executeModification(AbstractModification modification) {
- if(LOG.isDebugEnabled()) {
- LOG.debug("Tx {} executeModification {} called path = {}", getIdentifier(), modification.getClass()
- .getSimpleName(), modification.getPath());
+ void executeDelete(final YangInstanceIdentifier path, final Boolean havePermit) {
+ LOG.debug("Tx {} executeDelete called path = {}", getIdentifier(), path);
+ executeModification(new DeleteModification(path), havePermit);
+ }
+
+ @Override
+ void executeMerge(final YangInstanceIdentifier path, final NormalizedNode data, final Boolean havePermit) {
+ LOG.debug("Tx {} executeMerge called path = {}", getIdentifier(), path);
+ executeModification(new MergeModification(path, data), havePermit);
+ }
+
+ @Override
+ void executeWrite(final YangInstanceIdentifier path, final NormalizedNode data, final Boolean havePermit) {
+ LOG.debug("Tx {} executeWrite called path = {}", getIdentifier(), path);
+ executeModification(new WriteModification(path, data), havePermit);
+ }
+
+ private void executeModification(final AbstractModification modification, final Boolean havePermit) {
+ final boolean permitToRelease;
+ if (havePermit == null) {
+ permitToRelease = failedModification == null && acquireOperation();
+ } else {
+ permitToRelease = havePermit;