public class InterruptableExecutor
extends heros.solver.CountingThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| 限定符和类型 | 字段和说明 |
|---|---|
protected static org.slf4j.Logger |
logger |
| 构造器和说明 |
|---|
InterruptableExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
BlockingQueue<Runnable> workQueue) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
awaitCompletion() |
void |
awaitCompletion(long timeout,
TimeUnit unit) |
void |
execute(Runnable command) |
void |
interrupt()
Interrupts the executor.
|
boolean |
isFinished()
Gets whether this executor has terminated all of its tasks
|
boolean |
isTerminated() |
void |
reset()
Resets the executor to allow for new tasks once all previous tasks have
completed or after the executor has been interrupted.
|
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, terminated, toStringinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitpublic InterruptableExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
BlockingQueue<Runnable> workQueue)
public void interrupt()
public void reset()
public void execute(Runnable command)
public void awaitCompletion()
throws InterruptedException
awaitCompletion 在类中 heros.solver.CountingThreadPoolExecutorInterruptedExceptionpublic void awaitCompletion(long timeout,
TimeUnit unit)
throws InterruptedException
awaitCompletion 在类中 heros.solver.CountingThreadPoolExecutorInterruptedExceptionpublic boolean isFinished()
public boolean isTerminated()
isTerminated 在接口中 ExecutorServiceisTerminated 在类中 ThreadPoolExecutorCopyright © 2022 Fraunhofer SIT. All rights reserved.