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 org.opendaylight.controller.cluster.datastore.utils.ActorContext;
12 import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadTransaction;
13 import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadWriteTransaction;
14 import org.opendaylight.controller.sal.core.spi.data.DOMStoreTransactionChain;
15 import org.opendaylight.controller.sal.core.spi.data.DOMStoreWriteTransaction;
16 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
19 * TransactionChainProxy acts as a proxy for a DOMStoreTransactionChain created on a remote shard
21 public class TransactionChainProxy implements DOMStoreTransactionChain{
22 private final ActorContext actorContext;
23 private final SchemaContext schemaContext;
25 public TransactionChainProxy(ActorContext actorContext, SchemaContext schemaContext) {
26 this.actorContext = actorContext;
27 this.schemaContext = schemaContext;
31 public DOMStoreReadTransaction newReadOnlyTransaction() {
32 return new TransactionProxy(actorContext,
33 TransactionProxy.TransactionType.READ_ONLY, schemaContext);
37 public DOMStoreReadWriteTransaction newReadWriteTransaction() {
38 return new TransactionProxy(actorContext,
39 TransactionProxy.TransactionType.READ_WRITE, schemaContext);
43 public DOMStoreWriteTransaction newWriteOnlyTransaction() {
44 return new TransactionProxy(actorContext,
45 TransactionProxy.TransactionType.WRITE_ONLY, schemaContext);
50 // FIXME : The problem here is don't know which shard the transaction chain is to be created on ???
51 throw new UnsupportedOperationException("close - not sure what to do here?");