final class SharedThreadPoolStrategy extends AbstractThreadPoolStrategy
AbstractThreadPoolStrategy
Constructor and Description |
---|
SharedThreadPoolStrategy(ConsoleLogger logger,
java.util.concurrent.ExecutorService threadPool) |
Modifier and Type | Method and Description |
---|---|
boolean |
finished()
Waiting for scheduled tasks to finish.
|
boolean |
hasSharedThreadPool() |
protected boolean |
stop()
Stops scheduling new tasks (e.g.
|
private boolean |
stop(boolean interrupt) |
protected boolean |
stopNow()
Stops scheduling new tasks and interrupts running tasks
(e.g.
|
destroy, getFutureResults, getThreadPool, schedule, setDefaultShutdownHandler
canSchedule, disable, logQuietly
SharedThreadPoolStrategy(ConsoleLogger logger, java.util.concurrent.ExecutorService threadPool)
public boolean hasSharedThreadPool()
hasSharedThreadPool
in class SchedulingStrategy
public boolean finished() throws java.lang.InterruptedException
SchedulingStrategy
finished
in class SchedulingStrategy
java.lang.InterruptedException
- if interrupted while waiting
for scheduled tasks to finishRunnerScheduler.finished()
protected boolean stop()
SchedulingStrategy
ExecutorService.shutdown()
on a private thread pool which cannot be shared with other strategy).stop
in class AbstractThreadPoolStrategy
ExecutorService.shutdown()
protected boolean stopNow()
SchedulingStrategy
ExecutorService.shutdownNow()
on a private thread pool
which cannot be shared with other strategy).
This method calls SchedulingStrategy.stop()
by default.stopNow
in class AbstractThreadPoolStrategy
ExecutorService.shutdownNow()
private boolean stop(boolean interrupt)