AsyncWriteTransaction JavaDoc re. retries > instead of < 70/63470/1
authorMichael Vorburger <vorburger@redhat.com>
Sat, 23 Sep 2017 00:46:57 +0000 (02:46 +0200)
committerMichael Vorburger <vorburger@redhat.com>
Sat, 23 Sep 2017 00:46:57 +0000 (02:46 +0200)
in case of OptimisticLockFailedException, one should do:

   if (tries - 1 > 0) { // do retry
   } else { // out of retries

and not if (tries - 1 < 0 ).

Change-Id: I6a7b681c7e7bd1a9787c640e2cdd5ab7723a74a2
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncWriteTransaction.java

index cc22bb9..effeabe 100644 (file)
@@ -164,7 +164,7 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
      *
      *          public void onFailure( Throwable t ) {
      *              if( t instanceof OptimisticLockFailedException ) {
-     *                  if( ( tries - 1 ) &lt; 0 ) {
+     *                  if( ( tries - 1 ) &gt; 0 ) {
      *                      // do retry
      *                      doWrite( tries - 1 );
      *                  } else {

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