com.octo.android.robospice.priority
Class PausableThreadPoolExecutor
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
com.octo.android.robospice.priority.PausableThreadPoolExecutor
- All Implemented Interfaces:
- Executor, ExecutorService
- Direct Known Subclasses:
- PriorityThreadPoolExecutor
public class PausableThreadPoolExecutor
- extends ThreadPoolExecutor
This class is used internally. It makes testing easier.
- Author:
- SNI
Methods inherited from class java.util.concurrent.ThreadPoolExecutor |
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 |
PausableThreadPoolExecutor
public PausableThreadPoolExecutor(int corePoolSize,
int maxPoolSize,
int threadPriority)
- Creates a thread pool executor with a
PausablePriorityBlockingQueue
.
- Parameters:
corePoolSize
- the size of the pool of threads.maxPoolSize
- the size of the pool of threads.threadPriority
- the priority of threads created as defined by
Thread.setPriority(int)
.
PausableThreadPoolExecutor
public PausableThreadPoolExecutor(int poolSize,
int threadPriority)
- Creates a thread pool executor with a
PausablePriorityBlockingQueue
.
- Parameters:
poolSize
- the size of the pool of threads.threadPriority
- the priority of threads created as defined by
Thread.setPriority(int)
.
PausableThreadPoolExecutor
public PausableThreadPoolExecutor(int poolSize)
- Creates a thread pool executor with a
PausablePriorityBlockingQueue
and low priority threads.
- Parameters:
poolSize
- the size of the pool of threads.
pause
public void pause()
resume
public void resume()
Copyright © 2012-2014. All Rights Reserved.