Fix warnings/javadocs in sal-distributed-datastore
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / databroker / ShardedDOMStoreWriteTransaction.java
1 /*
2  * Copyright (c) 2016 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 package org.opendaylight.controller.cluster.databroker;
9
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;
15
16 /**
17  * Proxy implementation of {@link DOMStoreWriteTransaction}. It routes all requests to the backing
18  * {@link ClientTransaction}.
19  *
20  * @author Robert Varga
21  */
22 final class ShardedDOMStoreWriteTransaction extends AbstractShardedTransaction implements DOMStoreWriteTransaction {
23     ShardedDOMStoreWriteTransaction(final ClientTransaction tx) {
24         super(tx);
25     }
26
27     @Override
28     public void write(final YangInstanceIdentifier path, final NormalizedNode<?, ?> data) {
29         transaction().write(path, data);
30     }
31
32     @Override
33     public void merge(final YangInstanceIdentifier path, final NormalizedNode<?, ?> data) {
34         transaction().merge(path, data);
35     }
36
37     @Override
38     public void delete(final YangInstanceIdentifier path) {
39         transaction().delete(path);
40     }
41
42     @Override
43     public DOMStoreThreePhaseCommitCohort ready() {
44         return transaction().ready();
45     }
46
47     @Override
48     public void close() {
49         transaction().abort();
50     }
51 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.