public < T , E extends Exception > T doUntilResult ( ExceptionalSupplier < T , E > task ) throws InterruptedException , BackoffStoppedException , E { T result = task . get ( ) ; // give an immediate try return ( result != null ) ? result : retryWork ( task ) ; }
Executes the given task using the configured backoff strategy until the task succeeds as indicated by returning a non - null value .