Add a bit of documentation 47/5347/1
authorRobert Varga <rovarga@cisco.com>
Sat, 15 Feb 2014 06:05:11 +0000 (07:05 +0100)
committerRobert Varga <rovarga@cisco.com>
Sat, 15 Feb 2014 08:38:36 +0000 (09:38 +0100)
Change-Id: I57883cffb62f4f22de74d567f9d040a90e21a5d0
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/TransactionStatus.java
opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NetconfDeviceTwoPhaseCommitTransaction.java

index 92ff551..a8989c4 100644 (file)
@@ -8,9 +8,26 @@
 package org.opendaylight.controller.md.sal.common.api;
 
 public enum TransactionStatus {
+    /**
+     * The transaction has been freshly allocated. The user is still accessing
+     * it and it has not been sealed.
+     */
     NEW,
+    /**
+     * The transaction has been completed by the user and sealed. It is currently
+     * awaiting execution.
+     */
     SUBMITED,
+    /**
+     * The transaction has been successfully committed to backing store.
+     */
     COMMITED,
+    /**
+     * The transaction has failed to commit due to some underlying issue.
+     */
     FAILED,
-    CANCELED
+    /**
+     * Currently unused.
+     */
+    CANCELED,
 }
index 83700c8..c5390e5 100644 (file)
@@ -7,11 +7,11 @@
  */
 package org.opendaylight.controller.sal.connect.netconf;
 
-import static org.opendaylight.controller.sal.connect.netconf.NetconfMapping.NETCONF_OPERATION_QNAME;
 import static org.opendaylight.controller.sal.connect.netconf.NetconfMapping.NETCONF_CANDIDATE_QNAME;
 import static org.opendaylight.controller.sal.connect.netconf.NetconfMapping.NETCONF_COMMIT_QNAME;
 import static org.opendaylight.controller.sal.connect.netconf.NetconfMapping.NETCONF_CONFIG_QNAME;
 import static org.opendaylight.controller.sal.connect.netconf.NetconfMapping.NETCONF_EDIT_CONFIG_QNAME;
+import static org.opendaylight.controller.sal.connect.netconf.NetconfMapping.NETCONF_OPERATION_QNAME;
 import static org.opendaylight.controller.sal.connect.netconf.NetconfMapping.NETCONF_RUNNING_QNAME;
 import static org.opendaylight.controller.sal.connect.netconf.NetconfMapping.NETCONF_TARGET_QNAME;
 
@@ -132,7 +132,7 @@ public class NetconfDeviceTwoPhaseCommitTransaction implements DataCommitTransac
     }
 
     @Override
-    public RpcResult<Void> finish() throws IllegalStateException {
+    public RpcResult<Void> finish() {
         CompositeNodeBuilder<ImmutableCompositeNode> commitInput = ImmutableCompositeNode.builder();
         commitInput.setQName(NETCONF_COMMIT_QNAME);
         RpcResult<?> rpcResult = device.invokeRpc(NetconfMapping.NETCONF_COMMIT_QNAME, commitInput.toInstance());

©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.