クラス RepeatContextCounter
java.lang.ObjectSE
org.springframework.batch.repeat.context.RepeatContextCounter
バッチのスコープ内で何らかのイベント(コンテキスト内の例外型など)の発生数をカウントする必要があるポリシーのヘルパークラス。カウンターの値は、ネストされたコンテキストのバッチ間で格納できるため、終了の決定は、多数の兄弟バッチの集約に基づいて行われます。
- 作成者:
- Dave Syer
コンストラクターのサマリー
コンストラクター説明RepeatContextCounter
(RepeatContext context, StringSE countKey) useParent = false のコンビニエンスコンストラクター。RepeatContextCounter
(RepeatContext context, StringSE countKey, boolean useParent) 新しいRepeatContextCounter
を作成します。メソッドのサマリー
コンストラクターの詳細
RepeatContextCounter
useParent = false のコンビニエンスコンストラクター。- パラメーター:
context
- 現在のコンテキスト。countKey
- カウンターをコンテキストに格納するために使用するキー。
RepeatContextCounter
新しいRepeatContextCounter
を作成します。- パラメーター:
context
- 現在のコンテキスト。countKey
- カウンターをコンテキストに格納するために使用するキー。useParent
- カウンターが兄弟間で共有される場合は true。状態は、コンテキスト自体ではなく、コンテキストの親(存在する場合)に格納されます。
メソッドの詳細
increment
public final void increment(int delta) カウンターをインクリメントします。- パラメーター:
delta
- カウンターをインクリメントする量。
increment
public final void increment()1 ずつインクリメントします。getCount
public int getCount()- 戻り値:
- カウンターの現在の値