インタフェースjava.util.concurrent.RejectedExecutionHandler
の使用
-
RejectedExecutionHandlerを使用するパッケージ パッケージ 説明 java.util.concurrent 並行プログラミングでよく使用されるユーティリティ・クラスです。 -
-
java.util.concurrentでのRejectedExecutionHandlerの使用
RejectedExecutionHandlerを実装しているjava.util.concurrentのクラス 修飾子と型 クラス 説明 static classThreadPoolExecutor.AbortPolicyRejectedExecutionExceptionをスローする拒否されたタスクのハンドラです。static classThreadPoolExecutor.CallerRunsPolicyexecutorがシャットダウンしていない場合に、executeメソッドの呼出しスレッド内で、拒否されたタスクを直接実行する、拒否されたタスクのハンドラです。シャットダウンしている場合、タスクは破棄されます。static classThreadPoolExecutor.DiscardOldestPolicyexecutorがシャットダウンしていない場合に、もっとも古い未処理の要求を破棄してexecuteを再試行する、拒否されたタスクのハンドラです。シャットダウンしている場合、タスクは破棄されます。static classThreadPoolExecutor.DiscardPolicy拒否されたタスクを通知なしで破棄する拒否されたタスクのハンドラです。RejectedExecutionHandlerを返すjava.util.concurrentのメソッド 修飾子と型 メソッド 説明 RejectedExecutionHandlerThreadPoolExecutor. getRejectedExecutionHandler()実行可能でないタスクの現在のハンドラを返します。RejectedExecutionHandler型のパラメータを持つjava.util.concurrentのメソッド 修飾子と型 メソッド 説明 voidThreadPoolExecutor. setRejectedExecutionHandler(RejectedExecutionHandler handler)実行可能でないタスクの新しいハンドラを設定します。RejectedExecutionHandler型のパラメータを持つjava.util.concurrentのコンストラクタ コンストラクタ 説明 ScheduledThreadPoolExecutor(int corePoolSize, RejectedExecutionHandler handler)指定された初期パラメータを使って、新しいScheduledThreadPoolExecutorを作成します。ScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler)指定された初期パラメータを使って、新しいScheduledThreadPoolExecutorを作成します。ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, RejectedExecutionHandler handler)指定された初期パラメータと「デフォルトのスレッド・ファクトリ」で新しいThreadPoolExecutorを作成します。ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler)指定された初期パラメータを使って、新しいThreadPoolExecutorを作成します。
-