public static class BoxPreviewViewPager.BoxPreviewExecutor
extends java.util.concurrent.ThreadPoolExecutor
| Modifier and Type | Class and Description |
|---|---|
static class |
BoxPreviewViewPager.BoxPreviewExecutor.PreviewFutureTask |
static class |
BoxPreviewViewPager.BoxPreviewExecutor.PreviewMessage |
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy| Constructor and Description |
|---|
BoxPreviewExecutor(android.app.Application application,
int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterExecute(java.lang.Runnable r,
java.lang.Throwable t) |
static BoxPreviewViewPager.BoxPreviewExecutor |
createInstance(android.app.Application application) |
void |
execute(java.util.concurrent.FutureTask runnable,
int position,
java.lang.String boxItemId)
Wraps the runnable into a PreviewRunnable so that we can keep track of the position it belongs to.
|
java.util.Collection<java.util.concurrent.FutureTask> |
getTasks(int position) |
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, toStringpublic BoxPreviewExecutor(android.app.Application application,
int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue)
public static BoxPreviewViewPager.BoxPreviewExecutor createInstance(android.app.Application application)
public void execute(java.util.concurrent.FutureTask runnable,
int position,
java.lang.String boxItemId)
runnable - the runnable to execute.position - the position in the view pager this runnable is associated with.boxItemId - the id of the BoxItem associated with the requestprotected void afterExecute(java.lang.Runnable r,
java.lang.Throwable t)
afterExecute in class java.util.concurrent.ThreadPoolExecutorpublic java.util.Collection<java.util.concurrent.FutureTask> getTasks(int position)