T
- ビルダーの build()
メソッドによって返される MethodInterceptor
の型。public abstract class RetryInterceptorBuilder<T extends org.aopalliance.intercept.MethodInterceptor> extends Object (標準 Javadoc) (英語)
エラー時の動作を定義するための流れるようなインターフェースを提供することで、StatefulRetryOperationsInterceptor
または (ステートレスな) RetryOperationsInterceptor
の構築をより簡単かつシンプルにするための簡素化されたファサード。
典型的な例:
StatefulRetryOperationsInterceptor interceptor = RetryInterceptorBuilder.stateful() .maxAttempts(5).backOffOptions(1, 2, 10) // initialInterval, multiplier, // maxInterval .build();
修飾子と型 | クラスと説明 |
---|---|
static class | RetryInterceptorBuilder.CircuitBreakerInterceptorBuilder |
static class | RetryInterceptorBuilder.StatefulRetryInterceptorBuilder |
static class | RetryInterceptorBuilder.StatelessRetryInterceptorBuilder |
修飾子と型 | フィールドと説明 |
---|---|
protected String (標準 Javadoc) (英語) | label |
protected MethodInvocationRecoverer<?> | recoverer |
protected RetryOperations | retryOperations |
protected RetryTemplate | retryTemplate |
protected SimpleRetryPolicy | simpleRetryPolicy |
修飾子と型 | メソッドと説明 |
---|---|
RetryInterceptorBuilder<T> | backOffOptions(long initialInterval, double multiplier, long maxInterval) バックオフオプションを適用します。 |
RetryInterceptorBuilder<T> | backOffPolicy(BackOffPolicy policy) バックオフポリシーを適用します。 |
abstract T | build() |
static RetryInterceptorBuilder.CircuitBreakerInterceptorBuilder | circuitBreaker() サーキットブレーカー再試行インターセプターのビルダーを作成します。 |
RetryInterceptorBuilder<T> | label(String (標準 Javadoc) (英語) label) |
RetryInterceptorBuilder<T> | maxAttempts(int maxAttempts) 最大試行回数を適用します - SimpleRetryPolicy が使用されます。 |
RetryInterceptorBuilder<T> | recoverer(MethodInvocationRecoverer<?> recoverer) 再試行インターセプターに MethodInvocationRecoverer を適用します。 |
RetryInterceptorBuilder<T> | retryOperations(RetryOperations retryOperations) 再試行操作を適用します。これが設定されると、他のプロパティは設定できなくなります。他のプロパティが適用されている場合は設定できません。 |
RetryInterceptorBuilder<T> | retryPolicy(RetryPolicy policy) 再試行ポリシーを適用する - カスタム再試行テンプレートが提供されている場合、または最大試行回数またはバックオフオプションまたはポリシーが適用されている場合は使用できません。 |
static RetryInterceptorBuilder.StatefulRetryInterceptorBuilder | stateful() ステートフルな再試行インターセプターのビルダーを作成します。 |
static RetryInterceptorBuilder.StatelessRetryInterceptorBuilder | stateless() ステートレス再試行インターセプターのビルダーを作成します。 |
clone (標準 Javadoc) (英語) , equals (標準 Javadoc) (英語) , finalize (標準 Javadoc) (英語) , getClass (標準 Javadoc) (英語) , hashCode (標準 Javadoc) (英語) , notify (標準 Javadoc) (英語) , notifyAll (標準 Javadoc) (英語) , toString (標準 Javadoc) (英語) , wait (標準 Javadoc) (英語) , wait (標準 Javadoc) (英語) , wait (標準 Javadoc) (英語)
protected final RetryTemplate retryTemplate
protected final SimpleRetryPolicy simpleRetryPolicy
protected RetryOperations retryOperations
protected MethodInvocationRecoverer<?> recoverer
protected String (標準 Javadoc) (英語) label
public static RetryInterceptorBuilder.StatefulRetryInterceptorBuilder stateful()
public static RetryInterceptorBuilder.CircuitBreakerInterceptorBuilder circuitBreaker()
public static RetryInterceptorBuilder.StatelessRetryInterceptorBuilder stateless()
public RetryInterceptorBuilder<T> retryOperations(RetryOperations retryOperations)
retryOperations
- 再試行操作。public RetryInterceptorBuilder<T> maxAttempts(int maxAttempts)
maxAttempts
- 最大試行回数(最初の試行回数を含む)。public RetryInterceptorBuilder<T> backOffOptions(long initialInterval, double multiplier, long maxInterval)
initialInterval
- 初期間隔。multiplier
- 乗数。maxInterval
- 最大間隔。public RetryInterceptorBuilder<T> retryPolicy(RetryPolicy policy)
policy
- ポリシー。public RetryInterceptorBuilder<T> backOffPolicy(BackOffPolicy policy)
policy
- ポリシー。public RetryInterceptorBuilder<T> recoverer(MethodInvocationRecoverer<?> recoverer)
MethodInvocationRecoverer
を適用します。recoverer
- 回復者。public RetryInterceptorBuilder<T> label(String (標準 Javadoc) (英語) label)
public abstract T build()
Copyright © 2018 SpringSource (英語) . All rights reserved.