public class LayoutPriorityThreadPoolExecutor
extends java.util.concurrent.ThreadPoolExecutor
Modifier and Type | Class and Description |
---|---|
static class |
LayoutPriorityThreadPoolExecutor.ComparableFutureTask<T> |
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy
Constructor and Description |
---|
LayoutPriorityThreadPoolExecutor(int corePoolSize,
int maxPoolSize,
int threadPriority) |
Modifier and Type | Method and Description |
---|---|
<T> java.util.concurrent.Future<T> |
submit(java.util.concurrent.Callable<T> task) |
<T> java.util.concurrent.Future<T> |
submit(java.util.concurrent.Callable<T> task,
int priority)
Submit a task to the thread pool; the task will be scheduled to run based on the given
priority.
|
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, execute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, terminated, toString
public LayoutPriorityThreadPoolExecutor(int corePoolSize, int maxPoolSize, int threadPriority)
corePoolSize
- core thread pool sizemaxPoolSize
- max thread pool sizethreadPriority
- priority of threads in this poolpublic <T> java.util.concurrent.Future<T> submit(java.util.concurrent.Callable<T> task)
submit
in interface java.util.concurrent.ExecutorService
submit
in class java.util.concurrent.AbstractExecutorService
public <T> java.util.concurrent.Future<T> submit(java.util.concurrent.Callable<T> task, int priority)