レコードクラス MethodRetrySpec
java.lang.ObjectSE
java.lang.RecordSE
org.springframework.resilience.retry.MethodRetrySpec
- レコードコンポーネント:
includes- 再試行を試みる適用可能な例外の種類excludes- 再試行を回避するために適用されない例外型predicate- 適用可能なメソッドから例外をフィルタリングするための述語maxRetries- 再試行の最大回数timeout- 最初の呼び出しとその後の再試行に許容される最大経過時間(遅延を含む)delay- 最初の呼び出し後の基本遅延jitter- 次の再試行のジッター値multiplier- 次の再試行の遅延の乗数maxDelay- 再試行の最大遅延
public record MethodRetrySpec(CollectionSE<ClassSE<? extends ThrowableSE>> includes, CollectionSE<ClassSE<? extends ThrowableSE>> excludes, MethodRetryPredicate predicate, long maxRetries, DurationSE timeout, DurationSE delay, DurationSE jitter, double multiplier, DurationSE maxDelay)
extends RecordSE
特定のメソッドにおける再試行の仕様。共通の再試行特性を組み合わせたもの。これは
Retryable のアノテーション属性とほぼ一致します。- 導入:
- 7.0
- 作成者:
- Juergen Hoeller, Sam Brannen
- 関連事項:
コンストラクターの概要
コンストラクターコンストラクター説明MethodRetrySpec(CollectionSE<ClassSE<? extends ThrowableSE>> includes, CollectionSE<ClassSE<? extends ThrowableSE>> excludes, MethodRetryPredicate predicate, long maxRetries, DurationSE delay, DurationSE jitter, double multiplier, DurationSE maxDelay) 非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。MethodRetrySpec(CollectionSE<ClassSE<? extends ThrowableSE>> includes, CollectionSE<ClassSE<? extends ThrowableSE>> excludes, MethodRetryPredicate predicate, long maxRetries, DurationSE timeout, DurationSE delay, DurationSE jitter, double multiplier, DurationSE maxDelay) MethodRetrySpecレコードクラスのインスタンスを作成します。MethodRetrySpec(MethodRetryPredicate predicate, long maxRetries, DurationSE delay) 指定された引数を使用して新しいMethodRetryPredicateを構築します。MethodRetrySpec(MethodRetryPredicate predicate, long maxRetries, DurationSE delay, DurationSE jitter, double multiplier, DurationSE maxDelay) 指定された引数を使用して新しいMethodRetryPredicateを構築します。方法の概要
修飾子と型メソッド説明delay()delayレコードコンポーネントの値を返します。final boolean他のオブジェクトがこのオブジェクトと「等しい」かどうかを示します。CollectionSE<ClassSE<? extends ThrowableSE>> excludes()excludesレコードコンポーネントの値を返します。final inthashCode()このオブジェクトのハッシュコード値を返します。CollectionSE<ClassSE<? extends ThrowableSE>> includes()includesレコードコンポーネントの値を返します。jitter()jitterレコードコンポーネントの値を返します。maxDelay()maxDelayレコードコンポーネントの値を返します。longmaxRetriesレコードコンポーネントの値を返します。doublemultiplierレコードコンポーネントの値を返します。predicateレコードコンポーネントの値を返します。timeout()timeoutレコードコンポーネントの値を返します。final StringSEtoString()このレコードクラスの文字列表現を返します。
コンストラクターの詳細
MethodRetrySpec
指定された引数を使用して新しいMethodRetryPredicateを構築します。MethodRetrySpec
public MethodRetrySpec(MethodRetryPredicate predicate, long maxRetries, DurationSE delay, DurationSE jitter, double multiplier, DurationSE maxDelay) 指定された引数を使用して新しいMethodRetryPredicateを構築します。MethodRetrySpec
@DeprecatedSE(since="7.0.2", forRemoval=true) public MethodRetrySpec(CollectionSE<ClassSE<? extends ThrowableSE>> includes, CollectionSE<ClassSE<? extends ThrowableSE>> excludes, MethodRetryPredicate predicate, long maxRetries, DurationSE delay, DurationSE jitter, double multiplier, DurationSE maxDelay) 非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。Spring Framework 7.0.2 現在、MethodRetrySpec(Collection, Collection, MethodRetryPredicate, long, Duration, Duration, Duration, double, Duration)を推奨指定された引数を使用して新しいMethodRetryPredicateを構築します。MethodRetrySpec
public MethodRetrySpec(CollectionSE<ClassSE<? extends ThrowableSE>> includes, CollectionSE<ClassSE<? extends ThrowableSE>> excludes, MethodRetryPredicate predicate, long maxRetries, DurationSE timeout, DurationSE delay, DurationSE jitter, double multiplier, DurationSE maxDelay) MethodRetrySpecレコードクラスのインスタンスを作成します。- パラメーター:
includes-includesレコードコンポーネントの値excludes-excludesレコードコンポーネントの値predicate-predicateレコードコンポーネントの値maxRetries-maxRetriesレコードコンポーネントの値timeout-timeoutレコードコンポーネントの値delay-delayレコードコンポーネントの値jitter-jitterレコードコンポーネントの値multiplier-multiplierレコードコンポーネントの値maxDelay-maxDelayレコードコンポーネントの値
メソッドの詳細
toString
hashCode
equals
他のオブジェクトがこのオブジェクトと「等しい」かどうかを示します。他のオブジェクトが同じクラスであり、すべてのレコードコンポーネントが等しい場合、オブジェクトは等しいとみなされます。参照コンポーネントはObjects::equals(Object,Object)SE と比較され、プリミティブコンポーネントは対応するラッパークラスのcompareメソッドと比較されます。includes
excludes
predicate
maxRetries
timeout
delay
jitter
multiplier
maxDelay
MethodRetrySpec(Collection, Collection, MethodRetryPredicate, long, Duration, Duration, Duration, double, Duration)を推奨