public class ThreadPoolExecutor
extends AbstractExecutorService
See https://issues.liferay.com/browse/LPS-14986.
| Constructor and Description |
|---|
ThreadPoolExecutor(int corePoolSize,
int maxPoolSize) |
ThreadPoolExecutor(int corePoolSize,
int maxPoolSize,
long keepAliveTime,
TimeUnit timeUnit,
boolean allowCoreThreadTimeout,
int maxQueueSize) |
ThreadPoolExecutor(int corePoolSize,
int maxPoolSize,
long keepAliveTime,
TimeUnit timeUnit,
boolean allowCoreThreadTimeout,
int maxQueueSize,
RejectedExecutionHandler rejectedExecutionHandler,
ThreadFactory threadFactory,
ThreadPoolHandler threadPoolHandler) |
| Modifier and Type | Method and Description |
|---|---|
void |
adjustPoolSize(int newCorePoolSize,
int newMaxPoolSize) |
boolean |
awaitTermination(long timeout,
TimeUnit timeUnit) |
void |
execute(Runnable runnable) |
protected void |
finalize() |
int |
getActiveCount() |
long |
getCompletedTaskCount() |
int |
getCorePoolSize() |
long |
getKeepAliveTime(TimeUnit timeUnit) |
int |
getLargestPoolSize() |
protected ReentrantLock |
getMainLock() |
int |
getMaxPoolSize() |
String |
getName() |
int |
getPendingTaskCount() |
int |
getPoolSize() |
RejectedExecutionHandler |
getRejectedExecutionHandler() |
int |
getRemainingTaskQueueCapacity() |
long |
getTaskCount() |
protected TaskQueue<Runnable> |
getTaskQueue() |
ThreadFactory |
getThreadFactory() |
ThreadPoolHandler |
getThreadPoolHandler() |
protected Set<com.liferay.portal.kernel.concurrent.ThreadPoolExecutor.WorkerTask> |
getWorkerTasks() |
boolean |
isAllowCoreThreadTimeout() |
boolean |
isShutdown() |
boolean |
isTerminated() |
boolean |
isTerminating() |
protected <T> DefaultNoticeableFuture<T> |
newTaskFor(Callable<T> callable) |
protected <T> DefaultNoticeableFuture<T> |
newTaskFor(Runnable runnable,
T value) |
void |
setAllowCoreThreadTimeout(boolean allowCoreThreadTimeout) |
void |
setKeepAliveTime(long keepAliveTime,
TimeUnit timeUnit) |
void |
setName(String name) |
void |
setRejectedExecutionHandler(RejectedExecutionHandler rejectedExecutionHandler) |
void |
setThreadFactory(ThreadFactory threadFactory) |
void |
setThreadPoolHandler(ThreadPoolHandler threadPoolHandler) |
void |
shutdown() |
List<Runnable> |
shutdownNow() |
<T> NoticeableFuture<T> |
submit(Callable<T> callable) |
NoticeableFuture<?> |
submit(Runnable runnable) |
<T> NoticeableFuture<T> |
submit(Runnable runnable,
T result) |
NoticeableFuture<Void> |
terminationNoticeableFuture() |
public ThreadPoolExecutor(int corePoolSize,
int maxPoolSize)
public ThreadPoolExecutor(int corePoolSize,
int maxPoolSize,
long keepAliveTime,
TimeUnit timeUnit,
boolean allowCoreThreadTimeout,
int maxQueueSize)
public ThreadPoolExecutor(int corePoolSize,
int maxPoolSize,
long keepAliveTime,
TimeUnit timeUnit,
boolean allowCoreThreadTimeout,
int maxQueueSize,
RejectedExecutionHandler rejectedExecutionHandler,
ThreadFactory threadFactory,
ThreadPoolHandler threadPoolHandler)
public void adjustPoolSize(int newCorePoolSize,
int newMaxPoolSize)
public boolean awaitTermination(long timeout,
TimeUnit timeUnit)
throws InterruptedException
InterruptedExceptionpublic void execute(Runnable runnable)
public int getActiveCount()
public long getCompletedTaskCount()
public int getCorePoolSize()
public long getKeepAliveTime(TimeUnit timeUnit)
public int getLargestPoolSize()
public int getMaxPoolSize()
public String getName()
public int getPendingTaskCount()
public int getPoolSize()
public RejectedExecutionHandler getRejectedExecutionHandler()
public int getRemainingTaskQueueCapacity()
public long getTaskCount()
public ThreadFactory getThreadFactory()
public ThreadPoolHandler getThreadPoolHandler()
public boolean isAllowCoreThreadTimeout()
public boolean isShutdown()
public boolean isTerminated()
public boolean isTerminating()
public void setAllowCoreThreadTimeout(boolean allowCoreThreadTimeout)
public void setKeepAliveTime(long keepAliveTime,
TimeUnit timeUnit)
public void setName(String name)
public void setRejectedExecutionHandler(RejectedExecutionHandler rejectedExecutionHandler)
public void setThreadFactory(ThreadFactory threadFactory)
public void setThreadPoolHandler(ThreadPoolHandler threadPoolHandler)
public void shutdown()
public List<Runnable> shutdownNow()
public <T> NoticeableFuture<T> submit(Callable<T> callable)
submit in interface ExecutorServicesubmit in class AbstractExecutorServicepublic NoticeableFuture<?> submit(Runnable runnable)
submit in interface ExecutorServicesubmit in class AbstractExecutorServicepublic <T> NoticeableFuture<T> submit(Runnable runnable, T result)
submit in interface ExecutorServicesubmit in class AbstractExecutorServicepublic NoticeableFuture<Void> terminationNoticeableFuture()
protected void finalize()
finalize in class Objectprotected ReentrantLock getMainLock()
protected TaskQueue<Runnable> getTaskQueue()
protected Set<com.liferay.portal.kernel.concurrent.ThreadPoolExecutor.WorkerTask> getWorkerTasks()
protected <T> DefaultNoticeableFuture<T> newTaskFor(Callable<T> callable)
newTaskFor in class AbstractExecutorServiceprotected <T> DefaultNoticeableFuture<T> newTaskFor(Runnable runnable, T value)
newTaskFor in class AbstractExecutorService