protected boolean increaseBackoff ( ) { // Backoff is disabled if ( currentBackoff < 0 ) { return false ; } // This is the first time backing off if ( currentBackoff == 0 ) { currentBackoff = initialBackoff ; return true ; } // Continue backing off else if ( currentBackoff < maxBackoff ) { currentBackoff = Math . min ( currentBackoff * 2 , maxBackoff ) ; return true ; } // Reached maximum backoff return false ; }
Increases the current backoff and returns whether the operation was successful .