public static final < T > ListenableFuture < T > retryHelper ( final ScheduledExecutorService ses , final ExecutorService es , final Callable < T > callable , final long maxAttempts , final long startInterval , final TimeUnit startUnit , final long maxInterval , final TimeUnit maxUnit ) { SettableFuture < T > future = SettableFuture . create ( ) ; retryHelper ( ses , es , callable , maxAttempts , startInterval , startUnit , maxInterval , maxUnit , future ) ; return future ; }
A helper for retrying tasks asynchronously returns a settable future that can be used to attempt to cancel the task .