Dela via


ServicePartitionClient<TCommunicationClient>.InvokeWithRetry Method

Definition

Overloads

InvokeWithRetry(Action<TCommunicationClient>, Type[])
Obsolete.

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.

InvokeWithRetry<TResult>(Func<TCommunicationClient,TResult>, Type[])
Obsolete.

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.

InvokeWithRetry(Action<TCommunicationClient>, Type[])

Caution

Use InvokeWithRetryAsync Api instead

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.

[System.Obsolete("Use InvokeWithRetryAsync Api instead ")]
public void InvokeWithRetry (Action<TCommunicationClient> func, params Type[] doNotRetryExceptionTypes);
[<System.Obsolete("Use InvokeWithRetryAsync Api instead ")>]
member this.InvokeWithRetry : Action<'CommunicationClient (requires 'CommunicationClient :> Microsoft.ServiceFabric.Services.Communication.Client.ICommunicationClient)> * Type[] -> unit
Public Sub InvokeWithRetry (func As Action(Of TCommunicationClient), ParamArray doNotRetryExceptionTypes As Type())

Parameters

func
Action<TCommunicationClient>

Function being invoked

doNotRetryExceptionTypes
Type[]

Exceptions for which the service partition client should not retry

Attributes

Applies to

InvokeWithRetry<TResult>(Func<TCommunicationClient,TResult>, Type[])

Caution

Use InvokeWithRetryAsync Api instead

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.

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

Type Parameters

TResult

Result from the function being invoked

Parameters

func
Func<TCommunicationClient,TResult>

Function being invoked

doNotRetryExceptionTypes
Type[]

Exceptions for which the service partition client should not retry

Returns

TResult

Result from the function given in the argument

Attributes

Applies to