jp.terasoluna.fw.batch.core
クラス JobStatus

java.lang.Object
  上位を拡張 jp.terasoluna.fw.batch.core.JobStatus
直系の既知のサブクラス:
MonitorableJobStatus, RestartJobStatus, TransactionalJobStatus

public class JobStatus
extends java.lang.Object

ジョブの処理状況を保持するクラス。


入れ子のクラスの概要
static class JobStatus.STATE
          ジョブ状態の列挙クラス。
 
フィールドの概要
private  int batchUpdateCount
          バッチ更新件数。
private  java.util.List<JobStatus> childJobStatusList
          ジョブの処理状況のリスト。
private  int collected
          対象データ取得件数。
private  int commitCount
          ジョブのコミット件数。
private  long jobEndTime
          処理終了時刻。
private  java.lang.Integer jobExitCode
          ジョブ終了コード。
private  java.lang.String jobId
          ジョブID。
private  java.lang.String jobRequestNo
          ジョブリクエスト番号。
private  long jobStartTime
          処理開始時刻。
private  JobStatus.STATE jobState
          処理状況。
private  java.lang.String partitionKey
          ジョブ分割キー。
private  int partitionNo
          ジョブパーティション番号。
private  boolean restartable
          リスタート処理有無。
private  int restartPoint
          既存リスタート情報。
private  ResultCounter resultCounter
          BLogicの処理件数。
 
コンストラクタの概要
JobStatus()
          コンストラクタ。
 
メソッドの概要
protected  void addChildJobStatus(JobStatus jobStatus)
          子ジョブの処理結果をリストに追加する。
 void countBLogic(ReturnCode returnCode)
          ビジネスロジックの実行をカウントする。
 int getBatchUpdateCount()
          バッチ更新件数を取得する。
 JobStatus getChild(JobContext jobContext)
          子ジョブ処理状況を取得する。
 java.util.List<JobStatus> getChildJobStatusList()
          子ジョブの処理結果を保持したリストを取得する。
 int getCollected()
          Collectorの処理件数を返却する。
 int getCommitCount()
          コミット数を取得する。
 int getErrorContinueCount()
          処理継続数を取得する。
 java.lang.Integer getJobExitCode()
          ジョブ終了コードを取得する。
 java.lang.String getJobId()
          ジョブIDを取得する。
 java.lang.String getJobRequestNo()
          ジョブリクエスト番号を取得する。
 java.lang.String getJobStartTime()
          ジョブ開始時刻を取得する。
 JobStatus.STATE getJobState()
          ジョブの状態を取得する。
 java.lang.String getJobStateStr()
          ジョブ状態の文字例を取得する。
 int getNormalContinueCount()
          処理継続数を取得する。
 java.lang.String getPartitionKey()
          分割キーを取得する。
 int getPartitionNo()
          分割番号を取得する。
 java.lang.String getProcessingTime()
          ジョブ処理時間を取得する。
 int getRestartPoint()
          リスタートポイントを取得する。
 void incrementBatchUpdateCount(int batchUpdateCount)
          バッチ処理更新数をカウントする。
 void incrementCollected()
          Collecterの処理件数をインクリメントする。
 void incrementCommitCount()
          コミット数をインクリメントする。
 boolean isContinue()
          ジョブが継続状況であるかどうかを取得する。
 boolean isExecuting()
          ジョブが起動/再起動状況であるかどうかを取得する。
 boolean isRestartable()
          ジョブがリスタート可能なジョブであるかどうかを取得する。
 boolean isShutdownGraceful()
          中断終了が設定されているかどうかを取得する。
 boolean isShutdownImmediate()
          強制終了が設定されているかどうかを取得する。
protected  void resetChildData(JobStatus childJobStatus, JobContext jobContext)
          子ジョブ処理状況に親ジョブ処理状況を設定する。
 void setJobExitCode(java.lang.Integer jobExitCode)
          終了コードを設定する。
 void setJobId(java.lang.String jobId)
          ジョブIDを設定する。
 void setJobRequestNo(java.lang.String jobRequestNo)
          ジョブリクエスト番号を設定する。
 void setJobState(JobStatus.STATE jobState)
          ジョブの状態を設定する。
 void setPartitionKey(java.lang.String partitionKey)
          分割キーを設定する。
 void setPartitionNo(int partitionNo)
          分割番号を設定する。
 void setRestartable(boolean restartable)
          ジョブがリスタート可能なジョブであるかどうかを設定する。
 void setRestartPoint(int restartPoint)
          リスタートポイントを設定する。
 void shutdownGraceful()
          中断終了中を設定する。
 void shutdownImmediate()
          強制終了中を設定する。
 void suspend()
          「中断/強制終了フラグ」が true の場合、処理状況を 「中断/強制終了」に設定する。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

batchUpdateCount

private int batchUpdateCount
バッチ更新件数。


collected

private int collected
対象データ取得件数。


commitCount

private int commitCount
ジョブのコミット件数。


jobEndTime

private long jobEndTime
処理終了時刻。


jobExitCode

private java.lang.Integer jobExitCode
ジョブ終了コード。


jobStartTime

private long jobStartTime
処理開始時刻。


jobState

private JobStatus.STATE jobState
処理状況。


childJobStatusList

private java.util.List<JobStatus> childJobStatusList
ジョブの処理状況のリスト。


restartable

private boolean restartable
リスタート処理有無。


restartPoint

private int restartPoint
既存リスタート情報。


resultCounter

private ResultCounter resultCounter
BLogicの処理件数。


jobRequestNo

private java.lang.String jobRequestNo
ジョブリクエスト番号。


jobId

private java.lang.String jobId
ジョブID。


partitionNo

private int partitionNo
ジョブパーティション番号。


partitionKey

private java.lang.String partitionKey
ジョブ分割キー。

コンストラクタの詳細

JobStatus

public JobStatus()
コンストラクタ。 ジョブの処理状況を初期化する。

メソッドの詳細

suspend

public void suspend()
「中断/強制終了フラグ」が true の場合、処理状況を 「中断/強制終了」に設定する。


addChildJobStatus

protected void addChildJobStatus(JobStatus jobStatus)
子ジョブの処理結果をリストに追加する。

パラメータ:
jobStatus - 子ジョブの処理状況

countBLogic

public void countBLogic(ReturnCode returnCode)
ビジネスロジックの実行をカウントする。

パラメータ:
returnCode - ビジネスロジックのリターンコード

getChild

public JobStatus getChild(JobContext jobContext)
子ジョブ処理状況を取得する。

パラメータ:
jobContext - ジョブコンテキスト
戻り値:
子ジョブ処理状況

resetChildData

protected void resetChildData(JobStatus childJobStatus,
                              JobContext jobContext)
子ジョブ処理状況に親ジョブ処理状況を設定する。

パラメータ:
childJobStatus - 子ジョブ状況
jobContext - ジョブコンテキスト

getCollected

public int getCollected()
Collectorの処理件数を返却する。

戻り値:
Collectorの処理件数

getCommitCount

public int getCommitCount()
コミット数を取得する。

戻り値:
コミット数

getErrorContinueCount

public int getErrorContinueCount()
処理継続数を取得する。

戻り値:
処理継続数

getJobExitCode

public java.lang.Integer getJobExitCode()
ジョブ終了コードを取得する。

戻り値:
ジョブ終了コード

getBatchUpdateCount

public int getBatchUpdateCount()
バッチ更新件数を取得する。

戻り値:
バッチ更新件数

getJobStartTime

public java.lang.String getJobStartTime()
ジョブ開始時刻を取得する。

戻り値:
ジョブ開始時刻

getJobState

public JobStatus.STATE getJobState()
ジョブの状態を取得する。

戻り値:
処理状態

getJobStateStr

public java.lang.String getJobStateStr()
ジョブ状態の文字例を取得する。

戻り値:
処理状態の文字例

getChildJobStatusList

public java.util.List<JobStatus> getChildJobStatusList()
子ジョブの処理結果を保持したリストを取得する。

戻り値:
子ジョブの処理結果リスト

getNormalContinueCount

public int getNormalContinueCount()
処理継続数を取得する。

戻り値:
処理継続数

getProcessingTime

public java.lang.String getProcessingTime()
ジョブ処理時間を取得する。(ms単位)

戻り値:
ジョブ処理時間の文字列(xxxxxms)

getRestartPoint

public int getRestartPoint()
リスタートポイントを取得する。

戻り値:
リスタートポイント

incrementBatchUpdateCount

public void incrementBatchUpdateCount(int batchUpdateCount)
バッチ処理更新数をカウントする。

パラメータ:
batchUpdateCount - バッチ処理更新数

incrementCollected

public void incrementCollected()
Collecterの処理件数をインクリメントする。


incrementCommitCount

public void incrementCommitCount()
コミット数をインクリメントする。


isContinue

public boolean isContinue()
ジョブが継続状況であるかどうかを取得する。

戻り値:
ジョブが継続状況である場合に true

isExecuting

public boolean isExecuting()
ジョブが起動/再起動状況であるかどうかを取得する。

戻り値:
ジョブが起動/再起動状況である場合に true

isRestartable

public boolean isRestartable()
ジョブがリスタート可能なジョブであるかどうかを取得する。

戻り値:
ジョブがリスタート可能なジョブである場合に true

isShutdownGraceful

public boolean isShutdownGraceful()
中断終了が設定されているかどうかを取得する。

戻り値:
中断終了が設定されている場合に true

isShutdownImmediate

public boolean isShutdownImmediate()
強制終了が設定されているかどうかを取得する。

戻り値:
強制終了が設定されている場合に true

setJobExitCode

public void setJobExitCode(java.lang.Integer jobExitCode)
終了コードを設定する。

パラメータ:
jobExitCode - 終了コード

setJobState

public void setJobState(JobStatus.STATE jobState)
ジョブの状態を設定する。

パラメータ:
jobState - 処理状態

setRestartable

public void setRestartable(boolean restartable)
ジョブがリスタート可能なジョブであるかどうかを設定する。

パラメータ:
restartable - ジョブがリスタート可能なジョブである場合に true

setRestartPoint

public void setRestartPoint(int restartPoint)
リスタートポイントを設定する。

パラメータ:
restartPoint - リスタートポイント

shutdownGraceful

public void shutdownGraceful()
中断終了中を設定する。


shutdownImmediate

public void shutdownImmediate()
強制終了中を設定する。


getJobId

public java.lang.String getJobId()
ジョブIDを取得する。

戻り値:
ジョブID

setJobId

public void setJobId(java.lang.String jobId)
ジョブIDを設定する。

パラメータ:
jobId - ジョブID

getPartitionKey

public java.lang.String getPartitionKey()
分割キーを取得する。

戻り値:
分割キー

setPartitionKey

public void setPartitionKey(java.lang.String partitionKey)
分割キーを設定する。

パラメータ:
partitionKey - 分割キー

getPartitionNo

public int getPartitionNo()
分割番号を取得する。

戻り値:
分割番号

setPartitionNo

public void setPartitionNo(int partitionNo)
分割番号を設定する。

パラメータ:
partitionNo - 分割番号

getJobRequestNo

public java.lang.String getJobRequestNo()
ジョブリクエスト番号を取得する。

戻り値:
ジョブリクエスト番号

setJobRequestNo

public void setJobRequestNo(java.lang.String jobRequestNo)
ジョブリクエスト番号を設定する。

パラメータ:
jobRequestNo - ジョブリクエスト番号