import org.opendaylight.yangtools.yang.model.api.SchemaContext;
public final class NetconfDeviceDataBroker implements PingPongMergingDOMDataBroker {
+
private final RemoteDeviceId id;
private final NetconfBaseOps netconfOps;
-
private final boolean rollbackSupport;
private final boolean candidateSupported;
private final boolean runningWritable;
+ private boolean isLockAllowed = true;
+
public NetconfDeviceDataBroker(final RemoteDeviceId id, final SchemaContext schemaContext,
final DOMRpcService rpc, final NetconfSessionPreferences netconfSessionPreferences) {
this.id = id;
public DOMDataTreeWriteTransaction newWriteOnlyTransaction() {
if (candidateSupported) {
if (runningWritable) {
- return new WriteCandidateRunningTx(id, netconfOps, rollbackSupport);
+ return new WriteCandidateRunningTx(id, netconfOps, rollbackSupport, isLockAllowed);
} else {
- return new WriteCandidateTx(id, netconfOps, rollbackSupport);
+ return new WriteCandidateTx(id, netconfOps, rollbackSupport, isLockAllowed);
}
} else {
- return new WriteRunningTx(id, netconfOps, rollbackSupport);
+ return new WriteRunningTx(id, netconfOps, rollbackSupport, isLockAllowed);
}
}
public ClassToInstanceMap<DOMDataBrokerExtension> getExtensions() {
return ImmutableClassToInstanceMap.of();
}
+
+ void setLockAllowed(boolean isLockAllowedOrig) {
+ this.isLockAllowed = isLockAllowedOrig;
+ }
+
}