+ public <T extends DataObject> void mergeToTransaction(final LogicalDatastoreType store,
+ final InstanceIdentifier<T> path,
+ final T data,
+ final boolean createParents){
+ synchronized (txLock) {
+ ensureTransaction();
+ if (writeTx == null) {
+ LOG.debug("WriteTx is null for node {}. Merge data for {} was not realized.", this.nodeId, path);
+ throw new TransactionChainClosedException(CANNOT_WRITE_INTO_TRANSACTION);
+ }
+
+ writeTx.merge(store, path, data, createParents);
+ }
+ }
+
+ public <T extends DataObject> CheckedFuture<com.google.common.base.Optional<T>, ReadFailedException>
+ readFromTransaction(final LogicalDatastoreType store,
+ final InstanceIdentifier<T> path){
+ synchronized (txLock) {
+ ensureTransaction();
+ if (writeTx == null) {
+ LOG.debug("WriteTx is null for node {}. Read data for {} was not realized.", this.nodeId, path);
+ throw new TransactionChainClosedException(CANNOT_WRITE_INTO_TRANSACTION);
+ }
+
+ return writeTx.read(store, path);
+ }
+ }
+