org.wiperdog.jobmanager.internal
Class JobClassImpl

java.lang.Object
  extended by org.wiperdog.jobmanager.internal.JobClassImpl
All Implemented Interfaces:
JobClass

public class JobClassImpl
extends Object
implements JobClass

ジョブクラス実装

Author:
kurohara

Nested Class Summary
static class JobClassImpl.RuntimeLimitterJob
          最大実行継続可能時間を過ぎたジョブを停止させる為のジョブ
 
Field Summary
static String KEY_PENDETAT
           
static String SUFFIX_CANCELJOB
           
 
Constructor Summary
JobClassImpl(JobClassImpl src)
           
JobClassImpl(JobFacade jf, org.quartz.Scheduler sched, String name)
          コンストラクタ
 
Method Summary
 void addJob(org.quartz.JobKey key)
          ジョブクラスにジョブを追加
 void cancelSpecifiedVetoedJob(org.quartz.JobKey jk)
          同時実行数制限により実行待ちしているjobをキャンセルする。
 void close()
          JobClassをクローズする
 void deleteJob(org.quartz.JobKey key)
          ジョブクラスからジョブを削除
 List<org.quartz.JobKey> getAssignedList()
          所属リストを取得
 int getConcurrency()
          設定された同時実行数を取得
 int getCurrentRunningCount()
          現在実行中のジョブ数を取得
 long getMaxRunTime()
          ジョブが実行開始されたときの実行継続可能時間を取得 実行継続時間を過ぎたジョブはinterruptされる。
 long getMaxWaitTime()
          ジョブが同時実行数の制限によりスケジュール時刻に実行できないときの最大待ち時間 を取得
 String getName()
          ジョブクラス名を取得
 List<org.quartz.JobKey> getVetoedList()
          現在ジョブ実行が停止されたジョブのリスト
 Object[] getVetoedQueue()
           
 boolean isJobVetoed(org.quartz.JobKey jobkey)
          ジョブが、同時実行数の制限で止められているかどうか。
 void removeAllExpiredJob()
           
 void setConcurrency(int num)
          最大同時実行数をセット
 void setMaxRunTime(long timeInMillis)
          MaxRunTime(最大実行継続可能時間)を設定
 void setMaxWaitTime(long timeInMillis)
          MaxWaitTime(ジョブ実行までの最大待ち時間)を設定
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY_PENDETAT

public static final String KEY_PENDETAT
See Also:
Constant Field Values

SUFFIX_CANCELJOB

public static final String SUFFIX_CANCELJOB
See Also:
Constant Field Values
Constructor Detail

JobClassImpl

public JobClassImpl(JobFacade jf,
                    org.quartz.Scheduler sched,
                    String name)
             throws org.quartz.SchedulerException
コンストラクタ

Parameters:
sched - Quartzスケジューラインスタンス
name - ジョブクラス名
Throws:
org.quartz.SchedulerException

JobClassImpl

public JobClassImpl(JobClassImpl src)
             throws org.quartz.SchedulerException
Throws:
org.quartz.SchedulerException
Method Detail

toString

public String toString()
Overrides:
toString in class Object

close

public void close()
Description copied from interface: JobClass
JobClassをクローズする

Specified by:
close in interface JobClass

setMaxWaitTime

public void setMaxWaitTime(long timeInMillis)
MaxWaitTime(ジョブ実行までの最大待ち時間)を設定

Specified by:
setMaxWaitTime in interface JobClass
Parameters:
timeInMillis - 最大待ち時間(ミリ秒)

setMaxRunTime

public void setMaxRunTime(long timeInMillis)
MaxRunTime(最大実行継続可能時間)を設定

Specified by:
setMaxRunTime in interface JobClass
Parameters:
timeInMillis - 最大実行継続可能時間(ミリ秒)

setConcurrency

public void setConcurrency(int num)
最大同時実行数をセット

Specified by:
setConcurrency in interface JobClass
Parameters:
num - 実行数

addJob

public void addJob(org.quartz.JobKey key)
ジョブクラスにジョブを追加

Specified by:
addJob in interface JobClass
Parameters:
key - ジョブキー

deleteJob

public void deleteJob(org.quartz.JobKey key)
ジョブクラスからジョブを削除

Specified by:
deleteJob in interface JobClass
Parameters:
key -

getAssignedList

public List<org.quartz.JobKey> getAssignedList()
所属リストを取得

Specified by:
getAssignedList in interface JobClass
Returns:

getName

public String getName()
ジョブクラス名を取得

Specified by:
getName in interface JobClass
Returns:
ジョブクラス名

getConcurrency

public int getConcurrency()
Description copied from interface: JobClass
設定された同時実行数を取得

Specified by:
getConcurrency in interface JobClass
Returns:

getMaxWaitTime

public long getMaxWaitTime()
Description copied from interface: JobClass
ジョブが同時実行数の制限によりスケジュール時刻に実行できないときの最大待ち時間 を取得

Specified by:
getMaxWaitTime in interface JobClass
Returns:

getMaxRunTime

public long getMaxRunTime()
Description copied from interface: JobClass
ジョブが実行開始されたときの実行継続可能時間を取得 実行継続時間を過ぎたジョブはinterruptされる。

Specified by:
getMaxRunTime in interface JobClass
Returns:

getVetoedQueue

public Object[] getVetoedQueue()

removeAllExpiredJob

public void removeAllExpiredJob()

cancelSpecifiedVetoedJob

public void cancelSpecifiedVetoedJob(org.quartz.JobKey jk)
Description copied from interface: JobClass
同時実行数制限により実行待ちしているjobをキャンセルする。

Specified by:
cancelSpecifiedVetoedJob in interface JobClass

getCurrentRunningCount

public int getCurrentRunningCount()
Description copied from interface: JobClass
現在実行中のジョブ数を取得

Specified by:
getCurrentRunningCount in interface JobClass
Returns:

getVetoedList

public List<org.quartz.JobKey> getVetoedList()
Description copied from interface: JobClass
現在ジョブ実行が停止されたジョブのリスト

Specified by:
getVetoedList in interface JobClass
Returns:

isJobVetoed

public boolean isJobVetoed(org.quartz.JobKey jobkey)
Description copied from interface: JobClass
ジョブが、同時実行数の制限で止められているかどうか。

Specified by:
isJobVetoed in interface JobClass
Returns:


Copyright © 2013. All Rights Reserved.