@@ -399,55 +399,6 @@ public <T> DurableFuture<T> waitForConditionAsync(
399399 private static final String ANONYMOUS_CHILD_CONTEXT_NAME = "retry" ;
400400 private static final String ANONYMOUS_BACKOFF_PREFIX = "retry-backoff-" ;
401401
402- @ Override
403- @ SuppressWarnings ("unchecked" )
404- public <T > T withRetry (String name , WithRetry <T > operation , WithRetryConfig config ) {
405- Objects .requireNonNull (name , "name cannot be null" );
406- Objects .requireNonNull (operation , "operation cannot be null" );
407- Objects .requireNonNull (config , "config cannot be null" );
408-
409- if (config .wrapInChildContext ()) {
410- return (T ) runInChildContextAsync (
411- name ,
412- new TypeToken <Object >() {},
413- childCtx -> executeRetryLoop (childCtx , name , operation , config ),
414- RunInChildContextConfig .builder ().build (),
415- OperationSubType .WITH_RETRY )
416- .get ();
417- }
418- return (T ) runInVirtualChildContextAsync (
419- name ,
420- new TypeToken <Object >() {},
421- childCtx -> executeRetryLoop (childCtx , name , operation , config ),
422- RunInChildContextConfig .builder ().build (),
423- OperationSubType .WITH_RETRY )
424- .get ();
425- }
426-
427- @ Override
428- @ SuppressWarnings ("unchecked" )
429- public <T > T withRetry (WithRetry <T > operation , WithRetryConfig config ) {
430- Objects .requireNonNull (operation , "operation cannot be null" );
431- Objects .requireNonNull (config , "config cannot be null" );
432-
433- if (config .wrapInChildContext ()) {
434- return (T ) runInChildContextAsync (
435- ANONYMOUS_CHILD_CONTEXT_NAME ,
436- new TypeToken <Object >() {},
437- childCtx -> executeRetryLoop (childCtx , null , operation , config ),
438- RunInChildContextConfig .builder ().build (),
439- OperationSubType .WITH_RETRY )
440- .get ();
441- }
442- return (T ) runInVirtualChildContextAsync (
443- ANONYMOUS_CHILD_CONTEXT_NAME ,
444- new TypeToken <Object >() {},
445- childCtx -> executeRetryLoop (childCtx , null , operation , config ),
446- RunInChildContextConfig .builder ().build (),
447- OperationSubType .WITH_RETRY )
448- .get ();
449- }
450-
451402 @ Override
452403 @ SuppressWarnings ("unchecked" )
453404 public <T > DurableFuture <T > withRetryAsync (String name , WithRetry <T > operation , WithRetryConfig config ) {
0 commit comments