PriorityThreadPoolExecutor

public class PriorityThreadPoolExecutor extends ThreadPoolExecutor

ThreadPoolExecutor that implements a DependencyPriorityBlockingQueue. This supports both Dependency and Priority functionality.

Nested Class Summary

class PriorityThreadPoolExecutor.PriorityThreadFactory  

Public Method Summary

static <T extends Runnable & Dependency & Task & PriorityProvider> PriorityThreadPoolExecutor
create(int corePoolSize, int maxPoolSize)
static PriorityThreadPoolExecutor
static PriorityThreadPoolExecutor
create(int threadCount)
void
execute(Runnable command)
DependencyPriorityBlockingQueue

Protected Method Summary

void
afterExecute(Runnable runnable, Throwable throwable)
<T> RunnableFuture<T>
newTaskFor(Runnable runnable, T value)
<T> RunnableFuture<T>
newTaskFor(Callable<T> callable)

Inherited Method Summary

Public Methods

public static PriorityThreadPoolExecutor create (int corePoolSize, int maxPoolSize)

Parameters
corePoolSize Number of threads to specify for core pool size
maxPoolSize Number of threads to specify for max pool size

public static PriorityThreadPoolExecutor create ()

public static PriorityThreadPoolExecutor create (int threadCount)

Parameters
threadCount Number of threads to specify for Thread Pool

public void execute (Runnable command)

Parameters
command

public DependencyPriorityBlockingQueue getQueue ()

Protected Methods

protected void afterExecute (Runnable runnable, Throwable throwable)

Parameters
runnable
throwable

protected RunnableFuture<T> newTaskFor (Runnable runnable, T value)

Parameters
runnable
value

protected RunnableFuture<T> newTaskFor (Callable<T> callable)

Parameters
callable

发送以下问题的反馈:

此网页
需要帮助?请访问我们的支持页面