Liferay 6.1.2-ce-ga3

com.liferay.portal.kernel.concurrent
Class ThreadPoolExecutor

java.lang.Object
  extended by java.util.concurrent.AbstractExecutorService
      extended by com.liferay.portal.kernel.concurrent.ThreadPoolExecutor
All Implemented Interfaces:
Executor, ExecutorService

public class ThreadPoolExecutor
extends AbstractExecutorService

See http://issues.liferay.com/browse/LPS-14986.


Constructor Summary
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)
           
 
Method Summary
 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()
           
 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()
           
 void setAllowCoreThreadTimeout(boolean allowCoreThreadTimeout)
           
 void setKeepAliveTime(long keepAliveTime, TimeUnit timeUnit)
           
 void setRejectedExecutionHandler(RejectedExecutionHandler rejectedExecutionHandler)
           
 void setThreadFactory(ThreadFactory threadFactory)
           
 void setThreadPoolHandler(ThreadPoolHandler threadPoolHandler)
           
 void shutdown()
           
 List<Runnable> shutdownNow()
           
 
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadPoolExecutor

public ThreadPoolExecutor(int corePoolSize,
                          int maxPoolSize)

ThreadPoolExecutor

public ThreadPoolExecutor(int corePoolSize,
                          int maxPoolSize,
                          long keepAliveTime,
                          TimeUnit timeUnit,
                          boolean allowCoreThreadTimeout,
                          int maxQueueSize)

ThreadPoolExecutor

public ThreadPoolExecutor(int corePoolSize,
                          int maxPoolSize,
                          long keepAliveTime,
                          TimeUnit timeUnit,
                          boolean allowCoreThreadTimeout,
                          int maxQueueSize,
                          RejectedExecutionHandler rejectedExecutionHandler,
                          ThreadFactory threadFactory,
                          ThreadPoolHandler threadPoolHandler)
Method Detail

adjustPoolSize

public void adjustPoolSize(int newCorePoolSize,
                           int newMaxPoolSize)

awaitTermination

public boolean awaitTermination(long timeout,
                                TimeUnit timeUnit)
                         throws InterruptedException
Throws:
InterruptedException

execute

public void execute(Runnable runnable)

getActiveCount

public int getActiveCount()

getCompletedTaskCount

public long getCompletedTaskCount()

getCorePoolSize

public int getCorePoolSize()

getKeepAliveTime

public long getKeepAliveTime(TimeUnit timeUnit)

getLargestPoolSize

public int getLargestPoolSize()

getMaxPoolSize

public int getMaxPoolSize()

getPendingTaskCount

public int getPendingTaskCount()

getPoolSize

public int getPoolSize()

getRejectedExecutionHandler

public RejectedExecutionHandler getRejectedExecutionHandler()

getRemainingTaskQueueCapacity

public int getRemainingTaskQueueCapacity()

getTaskCount

public long getTaskCount()

getThreadFactory

public ThreadFactory getThreadFactory()

getThreadPoolHandler

public ThreadPoolHandler getThreadPoolHandler()

isAllowCoreThreadTimeout

public boolean isAllowCoreThreadTimeout()

isShutdown

public boolean isShutdown()

isTerminated

public boolean isTerminated()

isTerminating

public boolean isTerminating()

setAllowCoreThreadTimeout

public void setAllowCoreThreadTimeout(boolean allowCoreThreadTimeout)

setKeepAliveTime

public void setKeepAliveTime(long keepAliveTime,
                             TimeUnit timeUnit)

setRejectedExecutionHandler

public void setRejectedExecutionHandler(RejectedExecutionHandler rejectedExecutionHandler)

setThreadFactory

public void setThreadFactory(ThreadFactory threadFactory)

setThreadPoolHandler

public void setThreadPoolHandler(ThreadPoolHandler threadPoolHandler)

shutdown

public void shutdown()

shutdownNow

public List<Runnable> shutdownNow()

finalize

protected void finalize()
Overrides:
finalize in class Object

getMainLock

protected ReentrantLock getMainLock()

getTaskQueue

protected TaskQueue<Runnable> getTaskQueue()

getWorkerTasks

protected Set<com.liferay.portal.kernel.concurrent.ThreadPoolExecutor.WorkerTask> getWorkerTasks()

Liferay 6.1.2-ce-ga3