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 cc22bb91ad401a20bfdd06bdc6fd753422df546b..effeabefae89a69158d73028cc9467fb47f9a896 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 {