X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FShardDataTreeTransactionChain.java;h=eefebb6af8f6c65638cee9d6e19d965e9a58e0d4;hp=5c377d5ff526ac21fbc828f0261498a7f0eafac6;hb=4d1709660b7af992d4c382a2a38debb5c7d64fb9;hpb=21186d16ca8b233674ebdf3aa1ea190a2c0b3959 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeTransactionChain.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeTransactionChain.java index 5c377d5ff5..eefebb6af8 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeTransactionChain.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeTransactionChain.java @@ -10,6 +10,8 @@ package org.opendaylight.controller.cluster.datastore; import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; import javax.annotation.concurrent.NotThreadSafe; +import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifier; +import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeSnapshot; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -21,15 +23,15 @@ import org.slf4j.LoggerFactory; final class ShardDataTreeTransactionChain extends ShardDataTreeTransactionParent { private static final Logger LOG = LoggerFactory.getLogger(ShardDataTreeTransactionChain.class); private final ShardDataTree dataTree; - private final String chainId; + private final LocalHistoryIdentifier chainId; private ReadWriteShardDataTreeTransaction previousTx; private ReadWriteShardDataTreeTransaction openTransaction; private boolean closed; - ShardDataTreeTransactionChain(final String chainId, final ShardDataTree dataTree) { + ShardDataTreeTransactionChain(final LocalHistoryIdentifier localHistoryIdentifier, final ShardDataTree dataTree) { this.dataTree = Preconditions.checkNotNull(dataTree); - this.chainId = Preconditions.checkNotNull(chainId); + this.chainId = Preconditions.checkNotNull(localHistoryIdentifier); } private DataTreeSnapshot getSnapshot() { @@ -43,14 +45,14 @@ final class ShardDataTreeTransactionChain extends ShardDataTreeTransactionParent } } - ReadOnlyShardDataTreeTransaction newReadOnlyTransaction(final String txId) { + ReadOnlyShardDataTreeTransaction newReadOnlyTransaction(final TransactionIdentifier txId) { final DataTreeSnapshot snapshot = getSnapshot(); LOG.debug("Allocated read-only transaction {} snapshot {}", txId, snapshot); return new ReadOnlyShardDataTreeTransaction(txId, snapshot); } - ReadWriteShardDataTreeTransaction newReadWriteTransaction(final String txId) { + ReadWriteShardDataTreeTransaction newReadWriteTransaction(final TransactionIdentifier txId) { final DataTreeSnapshot snapshot = getSnapshot(); LOG.debug("Allocated read-write transaction {} snapshot {}", txId, snapshot);