C# 클래스 Spring.Retry.Retry.Policy.SimpleRetryPolicy

Simple retry policy that retries a fixed number of times for a set of named exceptions (and subclasses). The number of attempts includes the initial try, so e.g. retryTemplate = new RetryTemplate(new SimpleRetryPolicy(3)); retryTemplate.Execute(callback); will execute the callback at least once, and as many as 3 times.
상속: IRetryPolicy
파일 보기 프로젝트 열기: spring-projects/spring-net-retry

공개 프로퍼티들

프로퍼티 타입 설명
DEFAULT_MAX_ATTEMPTS int

공개 메소드들

메소드 설명
CanRetry ( IRetryContext context ) : bool

Test for retryable operation based on the status.

Close ( IRetryContext context ) : void

The close.

Open ( IRetryContext parent ) : IRetryContext

Get a status object that can be used to track the current operation according to this policy. Has to be aware of the latest exception and the number of attempts.

RegisterException ( IRetryContext context, Exception exception ) : void

Update the status with another attempted retry and the latest exception.

SimpleRetryPolicy ( ) : System

Initializes a new instance of the SimpleRetryPolicy class.

SimpleRetryPolicy ( int maxAttempts, bool>.IDictionary retryableExceptions ) : System

Initializes a new instance of the SimpleRetryPolicy class.

ToString ( ) : string

The to string.

비공개 메소드들

메소드 설명
RetryForException ( Exception ex ) : bool

Delegates to an exception classifier.

메소드 상세

CanRetry() 공개 메소드

Test for retryable operation based on the status.
public CanRetry ( IRetryContext context ) : bool
context IRetryContext The context.
리턴 bool

Close() 공개 메소드

The close.
public Close ( IRetryContext context ) : void
context IRetryContext The context.
리턴 void

Open() 공개 메소드

Get a status object that can be used to track the current operation according to this policy. Has to be aware of the latest exception and the number of attempts.
public Open ( IRetryContext parent ) : IRetryContext
parent IRetryContext The parent.
리턴 IRetryContext

RegisterException() 공개 메소드

Update the status with another attempted retry and the latest exception.
public RegisterException ( IRetryContext context, Exception exception ) : void
context IRetryContext The context.
exception System.Exception The throwable.
리턴 void

SimpleRetryPolicy() 공개 메소드

Initializes a new instance of the SimpleRetryPolicy class.
public SimpleRetryPolicy ( ) : System
리턴 System

SimpleRetryPolicy() 공개 메소드

Initializes a new instance of the SimpleRetryPolicy class.
public SimpleRetryPolicy ( int maxAttempts, bool>.IDictionary retryableExceptions ) : System
maxAttempts int The max attempts.
retryableExceptions bool>.IDictionary The retryable exceptions.
리턴 System

ToString() 공개 메소드

The to string.
public ToString ( ) : string
리턴 string

프로퍼티 상세

DEFAULT_MAX_ATTEMPTS 공개적으로 정적으로 프로퍼티

public static int DEFAULT_MAX_ATTEMPTS
리턴 int