2 * Copyright (c) 2016 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
8 package org.opendaylight.controller.cluster.databroker;
10 import org.opendaylight.controller.cluster.databroker.actors.dds.ClientTransaction;
11 import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort;
12 import org.opendaylight.controller.sal.core.spi.data.DOMStoreWriteTransaction;
13 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
14 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
17 * Proxy implementation of {@link DOMStoreWriteTransaction}. It routes all requests to the backing
18 * {@link ClientTransaction}.
20 * @author Robert Varga
22 final class ShardedDOMStoreWriteTransaction extends AbstractShardedTransaction implements DOMStoreWriteTransaction {
23 ShardedDOMStoreWriteTransaction(final ClientTransaction tx) {
28 public void write(final YangInstanceIdentifier path, final NormalizedNode<?, ?> data) {
29 transaction().write(path, data);
33 public void merge(final YangInstanceIdentifier path, final NormalizedNode<?, ?> data) {
34 transaction().merge(path, data);
38 public void delete(final YangInstanceIdentifier path) {
39 transaction().delete(path);
43 public DOMStoreThreePhaseCommitCohort ready() {
44 return transaction().ready();
48 public final void close() {
49 transaction().abort();