jp.terasoluna.fw.batch.springsupport.transaction
クラス TransactionalQueueProcessor

java.lang.Object
  上位を拡張 jp.terasoluna.fw.batch.standard.QueueProcessor
      上位を拡張 jp.terasoluna.fw.batch.springsupport.transaction.TransactionalQueueProcessor

public class TransactionalQueueProcessor
extends QueueProcessor

キューの処理をトランザクションで行うキュープロセッサクラス。

キューのすべての要素の処理を行った後で、ジョブステータスが JobStatus.STATE.STARTEDJobStatus.STATE.RESTARTED 、あるいはJobStatus.STATE.ENDING_NORMALLY である場合にはコミットし、そのほかの場合にはロールバックする。

トランザクション制御を行うため、ジョブステータスとして TransactionalJobStatusを使用する必要がある。


フィールドの概要
private  ThrowableHandler throwableHandler
          Throwableハンドラ。
 
コンストラクタの概要
TransactionalQueueProcessor()
           
 
メソッドの概要
 void process(WorkQueue workQueue, JobStatus jobStatus)
          キューの処理を行う。
 void setThrowableHandler(ThrowableHandler throwableHandler)
          Throwableハンドラを設定する。
 
クラス jp.terasoluna.fw.batch.standard.QueueProcessor から継承されたメソッド
printEndLog, printStartLog, setName, setPostProcessor, setPreProcessor, setWorker
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

throwableHandler

private ThrowableHandler throwableHandler
Throwableハンドラ。

コンストラクタの詳細

TransactionalQueueProcessor

public TransactionalQueueProcessor()
メソッドの詳細

process

public void process(WorkQueue workQueue,
                    JobStatus jobStatus)
キューの処理を行う。

オーバーライド:
クラス QueueProcessor 内の process
パラメータ:
workQueue - キュー
jobStatus - トランザクショナルジョブステータス

setThrowableHandler

public void setThrowableHandler(ThrowableHandler throwableHandler)
Throwableハンドラを設定する。

パラメータ:
throwableHandler - Throwableハンドラ