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%2FTransactionChainProxy.java;h=2e8538d07768479e336bfbcc877778e3c4872277;hp=837ffc1b51dd8c5b2a80a3cf2f71a1076406648d;hb=c46e223995956f1f759c551163c212947c1e2fb7;hpb=51e22e5781fb026423e37d623333e7dc3c3ec7b0 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionChainProxy.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionChainProxy.java index 837ffc1b51..2e8538d077 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionChainProxy.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionChainProxy.java @@ -13,37 +13,45 @@ import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadTransaction; import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadWriteTransaction; import org.opendaylight.controller.sal.core.spi.data.DOMStoreTransactionChain; import org.opendaylight.controller.sal.core.spi.data.DOMStoreWriteTransaction; +import org.opendaylight.yangtools.yang.model.api.SchemaContext; + +import java.util.concurrent.ExecutorService; /** * TransactionChainProxy acts as a proxy for a DOMStoreTransactionChain created on a remote shard */ public class TransactionChainProxy implements DOMStoreTransactionChain{ private final ActorContext actorContext; + private final ExecutorService transactionExecutor; + private final SchemaContext schemaContext; - public TransactionChainProxy(ActorContext actorContext) { + public TransactionChainProxy(ActorContext actorContext, ExecutorService transactionExecutor, SchemaContext schemaContext) { this.actorContext = actorContext; + this.transactionExecutor = transactionExecutor; + this.schemaContext = schemaContext; } @Override public DOMStoreReadTransaction newReadOnlyTransaction() { return new TransactionProxy(actorContext, - TransactionProxy.TransactionType.READ_ONLY); + TransactionProxy.TransactionType.READ_ONLY, transactionExecutor, schemaContext); } @Override public DOMStoreReadWriteTransaction newReadWriteTransaction() { return new TransactionProxy(actorContext, - TransactionProxy.TransactionType.WRITE_ONLY); + TransactionProxy.TransactionType.WRITE_ONLY, transactionExecutor, schemaContext); } @Override public DOMStoreWriteTransaction newWriteOnlyTransaction() { return new TransactionProxy(actorContext, - TransactionProxy.TransactionType.READ_WRITE); + TransactionProxy.TransactionType.READ_WRITE, transactionExecutor, schemaContext); } @Override public void close() { + // FIXME : The problem here is don't know which shard the transaction chain is to be created on ??? throw new UnsupportedOperationException("close - not sure what to do here?"); } }