Merge "Bug 629: Introduction of Configuration Commit Handler"
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / TransactionProxy.java
1 package org.opendaylight.controller.cluster.datastore;
2
3 import com.google.common.base.Optional;
4 import com.google.common.util.concurrent.ListenableFuture;
5 import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadWriteTransaction;
6 import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort;
7 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
8 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
9
10 /**
11  * TransactionProxy acts as a proxy for one or more transactions that were created on a remote shard
12  *
13  * Creating a transaction on the consumer side will create one instance of a transaction proxy. If during
14  * the transaction reads and writes are done on data that belongs to different shards then a separate transaction will
15  * be created on each of those shards by the TransactionProxy
16  *
17  * The TransactionProxy does not make any guarantees about atomicity or order in which the transactions on the various
18  * shards will be executed.
19  *
20  */
21 public class TransactionProxy implements DOMStoreReadWriteTransaction {
22     @Override
23     public ListenableFuture<Optional<NormalizedNode<?, ?>>> read(InstanceIdentifier path) {
24         throw new UnsupportedOperationException("read");
25     }
26
27     @Override
28     public void write(InstanceIdentifier path, NormalizedNode<?, ?> data) {
29         throw new UnsupportedOperationException("write");
30     }
31
32     @Override
33     public void merge(InstanceIdentifier path, NormalizedNode<?, ?> data) {
34         throw new UnsupportedOperationException("merge");
35     }
36
37     @Override
38     public void delete(InstanceIdentifier path) {
39         throw new UnsupportedOperationException("delete");
40     }
41
42     @Override
43     public DOMStoreThreePhaseCommitCohort ready() {
44         throw new UnsupportedOperationException("ready");
45     }
46
47     @Override
48     public Object getIdentifier() {
49         throw new UnsupportedOperationException("getIdentifier");
50     }
51
52     @Override
53     public void close() {
54         throw new UnsupportedOperationException("close");
55     }
56 }