Package io.agroal.pool.util
Class PriorityScheduledExecutor
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
java.util.concurrent.ScheduledThreadPoolExecutor
io.agroal.pool.util.PriorityScheduledExecutor
- All Implemented Interfaces:
Executor
,ExecutorService
,ScheduledExecutorService
- Author:
- Luis Barreiro
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
-
Constructor Summary
ConstructorDescriptionPriorityScheduledExecutor
(int executorSize, String threadPrefix, AgroalDataSourceListener... listeners) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
afterExecute
(Runnable r, Throwable t) protected void
beforeExecute
(Thread thread, Runnable lowPriorityTask) void
executeNow
(Runnable priorityTask) <T> Future<T>
executeNow
(Callable<T> priorityTask) <T> Future<T>
executeNow
(RunnableFuture<T> priorityFuture) void
shutdown()
Methods inherited from class java.util.concurrent.ScheduledThreadPoolExecutor
decorateTask, decorateTask, execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, submit, submit, submit
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, terminated, toString
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
-
Constructor Details
-
PriorityScheduledExecutor
public PriorityScheduledExecutor(int executorSize, String threadPrefix, AgroalDataSourceListener... listeners)
-
-
Method Details
-
executeNow
-
executeNow
-
executeNow
-
beforeExecute
- Overrides:
beforeExecute
in classThreadPoolExecutor
-
afterExecute
- Overrides:
afterExecute
in classThreadPoolExecutor
-
shutdown
public void shutdown()- Specified by:
shutdown
in interfaceExecutorService
- Overrides:
shutdown
in classScheduledThreadPoolExecutor
-
shutdownNow
- Specified by:
shutdownNow
in interfaceExecutorService
- Overrides:
shutdownNow
in classScheduledThreadPoolExecutor
-