public class AsyncFileCoordinator extends AsyncCoordinator
Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description | 
|---|
| AsyncFileCoordinator() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | enqueue(AsyncTask task)Enqueue a task object, normally you enqueue using task handler, which will then
 call this method. | 
| AsyncTask | enqueue(AsyncTaskHandler handler)Enqueue a new task runner; a task object will automatically be created for
 this handler. | 
| AsyncTask | enqueue(AsyncTaskHandler handler,
       String customKey,
       long executeAt)Enque a new task handler. | 
| AsyncTask | findAndLockNextTask(Long now)Find the next task that is unlocked and ready for execution, lock it, and return it. | 
| int | getPendingTaskCount()Get the number of tasks waiting to be executed. | 
| AsyncTaskPersister | getTaskPersister() | 
| PriorityBlockingQueue<AsyncTask> | getTaskQueue() | 
| boolean | hasPendingTaskWithCustomKey(String key)Has an unexecuted task with the given custom key | 
| boolean | hasSeenTask(String id) | 
| boolean | hasTaskWithCustomKey(String key)Has any task, pending or already run, with the given custom key | 
| boolean | hasTaskWithId(Long id)Check to see if the task with the given id exists in the queue | 
| protected boolean | lockTaskForExecution(AsyncTask task) | 
| boolean | markCompleted(AsyncTask task)Mark the task as completed. | 
| boolean | markFailed(AsyncTask task,
          Throwable throwable)Mark the task as failed. | 
| void | onLoadTaskOnBoot(AsyncTask task)Called when a task is loaded from the data store during the boot phase. | 
| void | saveNewTask(AsyncTask task)Save a new task to the data store | 
| void | updateTask(AsyncTask task,
          boolean executeAtChanged)Update a task with new information. | 
executeNext, executeNext, getExtraClassLoaders, gracefulShutdown, init, initAndStart, initEphemeralSynchronousForTests, initForTests, instance, isSynchronousMode, registerClassLoader, registerHandler, registerHandler, run, runTaskForId, shutDownForTests, startupactiveCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic AsyncFileCoordinator()
public AsyncTask enqueue(AsyncTaskHandler handler)
AsyncCoordinatorenqueue in class AsyncCoordinatorpublic AsyncTask enqueue(AsyncTaskHandler handler, String customKey, long executeAt)
AsyncCoordinatorenqueue in class AsyncCoordinatorhandler - - the task handler that will be executed.customKey - - a user generated unique key that allows you to prevent dupes or later update the taskexecuteAt - - when you want the task to execute, in epoch millisecondspublic void enqueue(AsyncTask task)
AsyncCoordinatorenqueue in class AsyncCoordinatorpublic void updateTask(AsyncTask task, boolean executeAtChanged)
AsyncCoordinatorupdateTask in class AsyncCoordinatorpublic void saveNewTask(AsyncTask task)
AsyncCoordinatorsaveNewTask in class AsyncCoordinatorpublic AsyncTask findAndLockNextTask(Long now)
AsyncCoordinatorfindAndLockNextTask in class AsyncCoordinatorprotected boolean lockTaskForExecution(AsyncTask task)
public boolean markCompleted(AsyncTask task)
AsyncCoordinatormarkCompleted in class AsyncCoordinatorpublic boolean markFailed(AsyncTask task, Throwable throwable)
AsyncCoordinatormarkFailed in class AsyncCoordinatorpublic AsyncTaskPersister getTaskPersister()
getTaskPersister in class AsyncCoordinatorpublic boolean hasSeenTask(String id)
public boolean hasTaskWithId(Long id)
AsyncCoordinatorhasTaskWithId in class AsyncCoordinatorpublic boolean hasPendingTaskWithCustomKey(String key)
AsyncCoordinatorhasPendingTaskWithCustomKey in class AsyncCoordinatorpublic boolean hasTaskWithCustomKey(String key)
AsyncCoordinatorhasTaskWithCustomKey in class AsyncCoordinatorpublic PriorityBlockingQueue<AsyncTask> getTaskQueue()
public void onLoadTaskOnBoot(AsyncTask task)
AsyncCoordinatoronLoadTaskOnBoot in class AsyncCoordinatorpublic int getPendingTaskCount()
AsyncCoordinatorgetPendingTaskCount in class AsyncCoordinatorCopyright © 2016. All rights reserved.