public Retryer < R > stopAfterDelay ( final long delayInMillis ) { checkArgument ( delayInMillis >= 0L , "delayInMillis must be >= 0 but is %d" , delayInMillis ) ; return withStopStrategy ( new StopStrategy ( ) { @ Override public boolean shouldStop ( int previousAttemptNumber , long delaySinceFirstAttemptInMillis ) { return delaySinceFirstAttemptInMillis >= delayInMillis ; } } ) ; }
Sets the stop strategy which stops after a given delay milliseconds