public class ConcurrencyThrottleInterceptor extends ConcurrencyThrottleSupport implements MethodInterceptor, SerializableSE
スレッドプール全体(Web コンテナーのスレッドプールなど)を制限するよりも、特定のサービスの同時実行を調整する方が効率的なシナリオで、システムリソースの大量使用を伴うローカルサービスのメソッドに適用できます。
このインターセプターのデフォルトの同時実行制限は 1 です。この値を変更するには、"concurrencyLimit" Bean プロパティを指定します。
ConcurrencyThrottleSupport.setConcurrencyLimit(int), 連載形式 logger, NO_CONCURRENCY, UNBOUNDED_CONCURRENCY| コンストラクターと説明 |
|---|
ConcurrencyThrottleInterceptor() |
| 修飾子と型 | メソッドと説明 |
|---|---|
ObjectSE | invoke(MethodInvocation methodInvocation) このメソッドを実装して、呼び出しの前後に追加の処理を実行します。 |
afterAccess, beforeAccess, getConcurrencyLimit, isThrottleActive, setConcurrencyLimitcloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE@Nullable public ObjectSE invoke(MethodInvocation methodInvocation) throws ThrowableSE
MethodInterceptorJoinpoint.proceed() を呼び出すようにします。MethodInterceptor の invoke methodInvocation - メソッド呼び出しジョインポイント Joinpoint.proceed() の呼び出しの結果。インターセプターによってインターセプトされる可能性があります ThrowableSE - インターセプターまたはターゲットオブジェクトが例外をスローする場合