@Published(tag="architect") public abstract class AbstractExecutorServiceFactory extends java.lang.Object implements ExecutorServiceFactory, Initializable
ExecutorServiceFactoryの実装をサポートする抽象クラス。
 ExecutorServiceFactoryの実装クラスで共通となる処理を提供する。| Modifier and Type | Field and Description | 
|---|---|
static long | 
DEFAULT_TIMEOUT_SECOND
デフォルトのタイムアウト(秒) 
 | 
protected java.util.concurrent.ExecutorService | 
executorService
ExecutorService | 
protected long | 
timeoutSecond
タイムアウト(秒) 
 | 
| Constructor and Description | 
|---|
AbstractExecutorServiceFactory()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected boolean | 
awaitTermination()
スレッド終了を待つ。 
 | 
protected abstract java.util.concurrent.ExecutorService | 
createExecutorService()
ExecutorServiceインスタンスを生成する。
 サブクラスにて、インスタンスを生成、必要な設定を行うこと。 | 
java.util.concurrent.ExecutorService | 
getExecutorService()
ExecutorServiceを取得する。 | 
void | 
initialize()
初期化処理を行う。 
 | 
protected boolean | 
needsShutdown()
シャットダウン処理を行う必要があるかどうか判定する。 
 | 
void | 
setTimeoutSecond(long timeoutSecond)
スレッドの停止を待機する時間(秒)を設定する。 
 | 
void | 
shutdownService()
シャットダウンを行う。 
 | 
void | 
startShutdownService()
シャットダウンを開始する。
 このメソッド起動後は、以降の要求は受け付けられない。 
 | 
public static final long DEFAULT_TIMEOUT_SECOND
protected long timeoutSecond
protected java.util.concurrent.ExecutorService executorService
ExecutorServicepublic void initialize()
Initializableinitialize in interface Initializableprotected abstract java.util.concurrent.ExecutorService createExecutorService()
ExecutorServiceインスタンスを生成する。
 サブクラスにて、インスタンスを生成、必要な設定を行うこと。ExecutorServiceインスタンスpublic java.util.concurrent.ExecutorService getExecutorService()
ExecutorServiceFactoryExecutorServiceを取得する。getExecutorService in interface ExecutorServiceFactoryExecutorServicepublic void startShutdownService()
ExecutorServiceFactorystartShutdownService in interface ExecutorServiceFactorypublic void shutdownService()
ExecutorServiceFactoryshutdownService in interface ExecutorServiceFactoryprotected boolean awaitTermination()
                            throws java.lang.InterruptedException
ExecutorService.awaitTermination(long, TimeUnit)の戻り値java.lang.InterruptedException - 割り込みが発生した場合protected boolean needsShutdown()
public void setTimeoutSecond(long timeoutSecond)
timeoutSecond - スレッドの停止を待機する時間