@ SuppressWarnings ( "unchecked" ) public T withMaxDuration ( Duration maxDuration ) { Assert . notNull ( maxDuration , "maxDuration" ) ; this . maxDuration = maxDuration ; return ( T ) this ; }
Sets the max duration to perform attempts for .