ServicePartitionClient<TCommunicationClient>.InvokeWithRetryAsync Method

Definition

Overloads

InvokeWithRetryAsync(Func<TCommunicationClient,Task>, Type[])

Invokes the given Function, retrying for exceptions thrown other than the exceptions in the doNotRetryExceptionTypes. For exceptions that are not in doNotRetryExceptionTypes, CommunicationClientFactory's ReportOperationExceptionAsync() method controls if the exception should be retried or not.

InvokeWithRetryAsync(Func<TCommunicationClient,Task>, CancellationToken, Type[])

Invokes the given Function, retrying for exceptions thrown other than the exceptions in the doNotRetryExceptionTypes. For exceptions that are not in doNotRetryExceptionTypes, CommunicationClientFactory's ReportOperationExceptionAsync() method controls if the exception should be retried or not.

InvokeWithRetryAsync<TResult>(Func<TCommunicationClient,Task<TResult>>, Type[])

Invokes the given Function, retrying for exceptions thrown other than the exceptions in the doNotRetryExceptionTypes. For exceptions that are not in doNotRetryExceptionTypes, CommunicationClientFactory's ReportOperationExceptionAsync() method controls if the exception should be retried or not.

InvokeWithRetryAsync<TResult>(Func<TCommunicationClient,Task<TResult>>, CancellationToken, Type[])

Invokes the given Function, retrying for exceptions thrown other than the exceptions in the doNotRetryExceptionTypes. For exceptions that are not in doNotRetryExceptionTypes, CommunicationClientFactory's ReportOperationExceptionAsync() method controls if the exception should be retried or not.

InvokeWithRetryAsync(Func<TCommunicationClient,Task>, Type[])

Invokes the given Function, retrying for exceptions thrown other than the exceptions in the doNotRetryExceptionTypes. For exceptions that are not in doNotRetryExceptionTypes, CommunicationClientFactory's ReportOperationExceptionAsync() method controls if the exception should be retried or not.

public System.Threading.Tasks.Task InvokeWithRetryAsync (Func<TCommunicationClient,System.Threading.Tasks.Task> func, params Type[] doNotRetryExceptionTypes);
member this.InvokeWithRetryAsync : Func<'CommunicationClient, System.Threading.Tasks.Task (requires 'CommunicationClient :> Microsoft.ServiceFabric.Services.Communication.Client.ICommunicationClient)> * Type[] -> System.Threading.Tasks.Task
Public Function InvokeWithRetryAsync (func As Func(Of TCommunicationClient, Task), ParamArray doNotRetryExceptionTypes As Type()) As Task

Parameters

func
Func<TCommunicationClient,Task>

Function being invoked

doNotRetryExceptionTypes
Type[]

Exceptions for which the service partition client should not retry

Returns

Task

A Task that represents outstanding operation.

Applies to

Product Introduced

InvokeWithRetryAsync(Func<TCommunicationClient,Task>, CancellationToken, Type[])

Invokes the given Function, retrying for exceptions thrown other than the exceptions in the doNotRetryExceptionTypes. For exceptions that are not in doNotRetryExceptionTypes, CommunicationClientFactory's ReportOperationExceptionAsync() method controls if the exception should be retried or not.

public System.Threading.Tasks.Task InvokeWithRetryAsync (Func<TCommunicationClient,System.Threading.Tasks.Task> func, System.Threading.CancellationToken cancellationToken, params Type[] doNotRetryExceptionTypes);
member this.InvokeWithRetryAsync : Func<'CommunicationClient, System.Threading.Tasks.Task (requires 'CommunicationClient :> Microsoft.ServiceFabric.Services.Communication.Client.ICommunicationClient)> * System.Threading.CancellationToken * Type[] -> System.Threading.Tasks.Task

Parameters

func
Func<TCommunicationClient,Task>

Function being invoked

cancellationToken
CancellationToken

Cancellation token

doNotRetryExceptionTypes
Type[]

Exceptions for which the service partition client should not retry

Returns

Task

A Task that represents outstanding operation.

Applies to

Product Introduced

InvokeWithRetryAsync<TResult>(Func<TCommunicationClient,Task<TResult>>, Type[])

Invokes the given Function, retrying for exceptions thrown other than the exceptions in the doNotRetryExceptionTypes. For exceptions that are not in doNotRetryExceptionTypes, CommunicationClientFactory's ReportOperationExceptionAsync() method controls if the exception should be retried or not.

public System.Threading.Tasks.Task<TResult> InvokeWithRetryAsync<TResult> (Func<TCommunicationClient,System.Threading.Tasks.Task<TResult>> func, params Type[] doNotRetryExceptionTypes);
member this.InvokeWithRetryAsync : Func<'CommunicationClient, System.Threading.Tasks.Task<'Result> (requires 'CommunicationClient :> Microsoft.ServiceFabric.Services.Communication.Client.ICommunicationClient)> * Type[] -> System.Threading.Tasks.Task<'Result>
Public Function InvokeWithRetryAsync(Of TResult) (func As Func(Of TCommunicationClient, Task(Of TResult)), ParamArray doNotRetryExceptionTypes As Type()) As Task(Of TResult)

Type Parameters

TResult

Result from the function being invoked

Parameters

func
Func<TCommunicationClient,Task<TResult>>

Function being invoked

doNotRetryExceptionTypes
Type[]

Exceptions for which the service partition client should not retry

Returns

Task<TResult>

A Task that represents outstanding operation. The result of the Task is the result from the function given in the argument.

Applies to

Product Introduced

InvokeWithRetryAsync<TResult>(Func<TCommunicationClient,Task<TResult>>, CancellationToken, Type[])

Invokes the given Function, retrying for exceptions thrown other than the exceptions in the doNotRetryExceptionTypes. For exceptions that are not in doNotRetryExceptionTypes, CommunicationClientFactory's ReportOperationExceptionAsync() method controls if the exception should be retried or not.

public System.Threading.Tasks.Task<TResult> InvokeWithRetryAsync<TResult> (Func<TCommunicationClient,System.Threading.Tasks.Task<TResult>> func, System.Threading.CancellationToken cancellationToken, params Type[] doNotRetryExceptionTypes);
member this.InvokeWithRetryAsync : Func<'CommunicationClient, System.Threading.Tasks.Task<'Result> (requires 'CommunicationClient :> Microsoft.ServiceFabric.Services.Communication.Client.ICommunicationClient)> * System.Threading.CancellationToken * Type[] -> System.Threading.Tasks.Task<'Result>

Type Parameters

TResult

Result from the function being invoked

Parameters

func
Func<TCommunicationClient,Task<TResult>>

Function being invoked

cancellationToken
CancellationToken

Cancellation token

doNotRetryExceptionTypes
Type[]

Exceptions for which the service partition client should not retry

Returns

Task<TResult>

A Task that represents outstanding operation. The result of the Task is the result from the function given in the argument.

Applies to

Product Introduced