public class AsyncDbCoordinator extends AsyncFileCoordinator
Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
AsyncDbCoordinator() |
Modifier and Type | Method and Description |
---|---|
AsyncTask |
findAndLockNextTask(Long now)
Find the next task that is unlocked and ready for execution, lock it, and return it.
|
boolean |
hasTaskWithId(Long taskId)
Check to see if the task with the given id exists in the queue
|
boolean |
markCompleted(AsyncTask task)
Mark the task as completed.
|
boolean |
markFailed(AsyncTask task,
Throwable throwable)
Mark the task as failed.
|
void |
saveNewTask(AsyncTask task)
Save a new task to the data store
|
void |
updateTask(AsyncTask task,
boolean executeAtChanged)
Update a task with new information.
|
enqueue, enqueue, enqueue, getPendingTaskCount, getTaskPersister, getTaskQueue, hasPendingTaskWithCustomKey, hasSeenTask, hasTaskWithCustomKey, lockTaskForExecution, onLoadTaskOnBoot
executeNext, executeNext, getExtraClassLoaders, gracefulShutdown, init, initAndStart, initEphemeralSynchronousForTests, initForTests, instance, isSynchronousMode, registerClassLoader, registerHandler, registerHandler, run, runTaskForId, shutDownForTests, startup
activeCount, 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, yield
public AsyncDbCoordinator()
public void updateTask(AsyncTask task, boolean executeAtChanged)
AsyncCoordinator
updateTask
in class AsyncFileCoordinator
public void saveNewTask(AsyncTask task)
AsyncCoordinator
saveNewTask
in class AsyncFileCoordinator
public AsyncTask findAndLockNextTask(Long now)
AsyncCoordinator
findAndLockNextTask
in class AsyncFileCoordinator
public boolean markCompleted(AsyncTask task)
AsyncCoordinator
markCompleted
in class AsyncFileCoordinator
public boolean markFailed(AsyncTask task, Throwable throwable)
AsyncCoordinator
markFailed
in class AsyncFileCoordinator
public boolean hasTaskWithId(Long taskId)
AsyncCoordinator
hasTaskWithId
in class AsyncFileCoordinator
Copyright © 2016. All rights reserved.