Package io.ebeaninternal.server.lib
Class DaemonScheduleThreadPool
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- java.util.concurrent.ThreadPoolExecutor
-
- java.util.concurrent.ScheduledThreadPoolExecutor
-
- io.ebeaninternal.server.lib.DaemonScheduleThreadPool
-
- All Implemented Interfaces:
Executor
,ExecutorService
,ScheduledExecutorService
public final class DaemonScheduleThreadPool extends ScheduledThreadPoolExecutor
Daemon based ScheduleThreadPool.Uses Daemon threads and hooks into shutdown event.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
-
-
Constructor Summary
Constructors Constructor Description DaemonScheduleThreadPool(int coreSize, int shutdownWaitSeconds, String namePrefix)
Construct the DaemonScheduleThreadPool.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
shutdown()
Shutdown this thread pool nicely if possible.-
Methods inherited from class java.util.concurrent.ScheduledThreadPoolExecutor
execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, shutdownNow, submit, submit, submit
-
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, toString
-
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
-
-
-
-
Constructor Detail
-
DaemonScheduleThreadPool
public DaemonScheduleThreadPool(int coreSize, int shutdownWaitSeconds, String namePrefix)
Construct the DaemonScheduleThreadPool.
-
-
Method Detail
-
shutdown
public void shutdown()
Shutdown this thread pool nicely if possible.This will wait a maximum of 20 seconds before terminating any threads still working.
- Specified by:
shutdown
in interfaceExecutorService
- Overrides:
shutdown
in classScheduledThreadPoolExecutor
-
-