2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
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
9 package org.opendaylight.controller.cluster.datastore;
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;
19 * TransactionProxy acts as a proxy for one or more transactions that were created on a remote shard
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
25 * The TransactionProxy does not make any guarantees about atomicity or order in which the transactions on the various
26 * shards will be executed.
29 public class TransactionProxy implements DOMStoreReadWriteTransaction {
31 public ListenableFuture<Optional<NormalizedNode<?, ?>>> read(InstanceIdentifier path) {
32 throw new UnsupportedOperationException("read");
36 public void write(InstanceIdentifier path, NormalizedNode<?, ?> data) {
37 throw new UnsupportedOperationException("write");
41 public void merge(InstanceIdentifier path, NormalizedNode<?, ?> data) {
42 throw new UnsupportedOperationException("merge");
46 public void delete(InstanceIdentifier path) {
47 throw new UnsupportedOperationException("delete");
51 public DOMStoreThreePhaseCommitCohort ready() {
52 throw new UnsupportedOperationException("ready");
56 public Object getIdentifier() {
57 throw new UnsupportedOperationException("getIdentifier");
62 throw new UnsupportedOperationException("close");