public class CompositeExecutor extends ObjectSE implements ExecutorSE
ExecutorSE。スレッドの共有がシステムの操作に悪影響を与える可能性がある、2 つの異なる操作型が使用されている場合に使用されます。例: 他のブロッキング操作(メッセージのアセンブルなど)に使用されている NIO イベント処理スレッド。CallerRunsPolicy 拒否実行ポリシーが使用されている場合、NIO イベントスレッドがデッドロックし、イベントの処理を停止する可能性があります。 このような環境で動作するために、セカンダリエグゼキュータは CallerRunsPolicy 拒否実行ポリシーを持ってはなりません。
通常、両方のエグゼキュータで CallerBlocksPolicy を使用することをお勧めします。
| コンストラクターと説明 |
|---|
CompositeExecutor(ExecutorSE primaryTaskExecutor, ExecutorSE secondaryTaskExecutor) |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | execute(RunnableSE task) プライマリエグゼキュータを使用して実行します。 |
void | execute2(RunnableSE task) セカンダリエグゼキュータを使用して実行します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpublic CompositeExecutor(ExecutorSE primaryTaskExecutor, ExecutorSE secondaryTaskExecutor)
public void execute(RunnableSE task)
ExecutorSE の executeSE task - 実行するタスク。public void execute2(RunnableSE task)
task - 実行するタスク。