다음을 통해 공유


AsyncExecutorWithRetries.ExecuteWithRetries 메서드

정의

오버로드

ExecuteWithRetries(Func<Int32,Task>, Int32, Func<Exception,Int32,Boolean>, TimeSpan, IBackoffProvider)

다시 시도 구성 매개 변수에 따라 지정된 함수를 여러 번 실행합니다.

ExecuteWithRetries<T>(Func<Int32,Task<T>>, Int32, Func<Exception,Int32,Boolean>, TimeSpan, IBackoffProvider)

다시 시도 구성 매개 변수에 따라 지정된 함수를 여러 번 실행합니다.

ExecuteWithRetries<T>(Func<Int32,Task<T>>, Int32, Int32, Func<T, Int32,Boolean>, Func<Exception,Int32,Boolean>, TimeSpan, IBackoffProvider, IBackoffProvider)

다시 시도 구성 매개 변수에 따라 지정된 function 횟수를 실행합니다.

ExecuteWithRetries(Func<Int32,Task>, Int32, Func<Exception,Int32,Boolean>, TimeSpan, IBackoffProvider)

Source:
AsyncExecutorWithRetries.cs

다시 시도 구성 매개 변수에 따라 지정된 함수를 여러 번 실행합니다.

public static System.Threading.Tasks.Task ExecuteWithRetries (Func<int,System.Threading.Tasks.Task> action, int maxNumErrorTries, Func<Exception,int,bool> retryExceptionFilter, TimeSpan maxExecutionTime, Orleans.Internal.IBackoffProvider onErrorBackOff);
static member ExecuteWithRetries : Func<int, System.Threading.Tasks.Task> * int * Func<Exception, int, bool> * TimeSpan * Orleans.Internal.IBackoffProvider -> System.Threading.Tasks.Task
Public Shared Function ExecuteWithRetries (action As Func(Of Integer, Task), maxNumErrorTries As Integer, retryExceptionFilter As Func(Of Exception, Integer, Boolean), maxExecutionTime As TimeSpan, onErrorBackOff As IBackoffProvider) As Task

매개 변수

action
Func<Int32,Task>

실행할 동작입니다.

maxNumErrorTries
Int32

최대 재시도 수

retryExceptionFilter
Func<Exception,Int32,Boolean>

다시 시도 예외 필터입니다.

maxExecutionTime
TimeSpan

최대 실행 시간입니다.

onErrorBackOff
IBackoffProvider

백오프 공급자입니다.

반환

Task 작업을 나타내는 입니다.

적용 대상

ExecuteWithRetries<T>(Func<Int32,Task<T>>, Int32, Func<Exception,Int32,Boolean>, TimeSpan, IBackoffProvider)

Source:
AsyncExecutorWithRetries.cs

다시 시도 구성 매개 변수에 따라 지정된 함수를 여러 번 실행합니다.

public static System.Threading.Tasks.Task<T> ExecuteWithRetries<T> (Func<int,System.Threading.Tasks.Task<T>> function, int maxNumErrorTries, Func<Exception,int,bool> retryExceptionFilter, TimeSpan maxExecutionTime, Orleans.Internal.IBackoffProvider onErrorBackOff);
static member ExecuteWithRetries : Func<int, System.Threading.Tasks.Task<'T>> * int * Func<Exception, int, bool> * TimeSpan * Orleans.Internal.IBackoffProvider -> System.Threading.Tasks.Task<'T>
Public Shared Function ExecuteWithRetries(Of T) (function As Func(Of Integer, Task(Of T)), maxNumErrorTries As Integer, retryExceptionFilter As Func(Of Exception, Integer, Boolean), maxExecutionTime As TimeSpan, onErrorBackOff As IBackoffProvider) As Task(Of T)

형식 매개 변수

T

매개 변수

function
Func<Int32,Task<T>>

실행할 대리자입니다.

maxNumErrorTries
Int32

최대 재시도 수

retryExceptionFilter
Func<Exception,Int32,Boolean>

다시 시도 예외 필터입니다.

maxExecutionTime
TimeSpan

최대 실행 시간입니다.

onErrorBackOff
IBackoffProvider

백오프 공급자입니다.

반환

Task<T>

제공된 함수의 성공적인 호출에서 반환되는 값입니다.

적용 대상

ExecuteWithRetries<T>(Func<Int32,Task<T>>, Int32, Int32, Func<T, Int32,Boolean>, Func<Exception,Int32,Boolean>, TimeSpan, IBackoffProvider, IBackoffProvider)

Source:
AsyncExecutorWithRetries.cs

다시 시도 구성 매개 변수에 따라 지정된 function 횟수를 실행합니다.

public static System.Threading.Tasks.Task<T> ExecuteWithRetries<T> (Func<int,System.Threading.Tasks.Task<T>> function, int maxNumSuccessTries, int maxNumErrorTries, Func<T,int,bool> retryValueFilter, Func<Exception,int,bool> retryExceptionFilter, TimeSpan maxExecutionTime = default, Orleans.Internal.IBackoffProvider onSuccessBackOff = default, Orleans.Internal.IBackoffProvider onErrorBackOff = default);
static member ExecuteWithRetries : Func<int, System.Threading.Tasks.Task<'T>> * int * int * Func<'T, int, bool> * Func<Exception, int, bool> * TimeSpan * Orleans.Internal.IBackoffProvider * Orleans.Internal.IBackoffProvider -> System.Threading.Tasks.Task<'T>
Public Shared Function ExecuteWithRetries(Of T) (function As Func(Of Integer, Task(Of T)), maxNumSuccessTries As Integer, maxNumErrorTries As Integer, retryValueFilter As Func(Of T, Integer, Boolean), retryExceptionFilter As Func(Of Exception, Integer, Boolean), Optional maxExecutionTime As TimeSpan = Nothing, Optional onSuccessBackOff As IBackoffProvider = Nothing, Optional onErrorBackOff As IBackoffProvider = Nothing) As Task(Of T)

형식 매개 변수

T

의 기본 반환 형식입니다 function.

매개 변수

function
Func<Int32,Task<T>>

실행할 함수

maxNumSuccessTries
Int32

성공한 실행 시도의 최대 수입니다. ExecuteWithRetries(Func<Int32,Task>, Int32, Func<Exception,Int32,Boolean>, TimeSpan, IBackoffProvider)가 지시 retryValueFilter 하는 경우 지정된 function 를 다시 실행하려고 합니다. -1 가 충족될 때까지 retryValueFilter 성공 재시도 횟수를 제한 없이 로 설정합니다. 한 번의 성공 시도에 대해서만 로 0 설정하면 retryValueFilter 무시되고 지정된 function 은 첫 번째 성공까지 한 번만 실행됩니다.

maxNumErrorTries
Int32

오류로 인한 최대 실행 시도 횟수입니다. 가 충족될 때까지 retryExceptionFilter 오류 재시도 횟수를 제한 없이 -1로 설정합니다.

retryValueFilter
Func<T,Int32,Boolean>

성공적인 실행을 다시 시도해야 하는지 여부를 나타내도록 필터링 function 합니다. 를 로 null 설정하여 성공적인 재시도를 사용하지 않도록 설정합니다.

retryExceptionFilter
Func<Exception,Int32,Boolean>

오류 실행을 다시 시도해야 하는지 여부를 나타내도록 필터링 function 합니다. 오류 재시도를 사용하지 않도록 설정하려면 로 null 설정합니다.

onSuccessBackOff
IBackoffProvider

성공 재시도 사이에 대기할 시간을 결정하는 백오프 공급자 개체입니다.

onErrorBackOff
IBackoffProvider

오류 재시도 사이에 대기할 시간을 결정하는 백오프 공급자 개체

반환

Task<T>

의 성공적인 호출에서 반환된 값입니다 function.

적용 대상