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