Add copyright messages for java files
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / TransactionProxy.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.controller.cluster.datastore;
10
11 import com.google.common.base.Optional;
12 import com.google.common.util.concurrent.ListenableFuture;
13 import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadWriteTransaction;
14 import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort;
15 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
16 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
17
18 /**
19  * TransactionProxy acts as a proxy for one or more transactions that were created on a remote shard
20  *
21  * Creating a transaction on the consumer side will create one instance of a transaction proxy. If during
22  * the transaction reads and writes are done on data that belongs to different shards then a separate transaction will
23  * be created on each of those shards by the TransactionProxy
24  *
25  * The TransactionProxy does not make any guarantees about atomicity or order in which the transactions on the various
26  * shards will be executed.
27  *
28  */
29 public class TransactionProxy implements DOMStoreReadWriteTransaction {
30     @Override
31     public ListenableFuture<Optional<NormalizedNode<?, ?>>> read(InstanceIdentifier path) {
32         throw new UnsupportedOperationException("read");
33     }
34
35     @Override
36     public void write(InstanceIdentifier path, NormalizedNode<?, ?> data) {
37         throw new UnsupportedOperationException("write");
38     }
39
40     @Override
41     public void merge(InstanceIdentifier path, NormalizedNode<?, ?> data) {
42         throw new UnsupportedOperationException("merge");
43     }
44
45     @Override
46     public void delete(InstanceIdentifier path) {
47         throw new UnsupportedOperationException("delete");
48     }
49
50     @Override
51     public DOMStoreThreePhaseCommitCohort ready() {
52         throw new UnsupportedOperationException("ready");
53     }
54
55     @Override
56     public Object getIdentifier() {
57         throw new UnsupportedOperationException("getIdentifier");
58     }
59
60     @Override
61     public void close() {
62         throw new UnsupportedOperationException("close");
63     }
64 }