Package | Description |
---|---|
io.stallion.asyncTasks |
Modifier and Type | Method and Description |
---|---|
AsyncTask |
AsyncTask.enqueue() |
AsyncTask |
AsyncFileCoordinator.enqueue(AsyncTaskHandler handler) |
abstract AsyncTask |
AsyncCoordinator.enqueue(AsyncTaskHandler handler)
Enqueue a new task runner; a task object will automatically be created for
this handler.
|
AsyncTask |
AsyncFileCoordinator.enqueue(AsyncTaskHandler handler,
String customKey,
long executeAt) |
abstract AsyncTask |
AsyncCoordinator.enqueue(AsyncTaskHandler handler,
String customKey,
long executeAt)
Enque a new task handler.
|
AsyncTask |
AsyncTaskDbPersister.findAndLockNextTask(Long now) |
AsyncTask |
AsyncFileCoordinator.findAndLockNextTask(Long now) |
AsyncTask |
AsyncDbCoordinator.findAndLockNextTask(Long now) |
protected abstract AsyncTask |
AsyncCoordinator.findAndLockNextTask(Long now)
Find the next task that is unlocked and ready for execution, lock it, and return it.
|
AsyncTask |
AsyncTaskDbPersister.findAndLockNextTask(Long now,
int depth) |
AsyncTask |
AsyncTaskHandlerBase.getTask() |
AsyncTask |
AsyncTaskHandler.getTask()
The internal AsyncTask object associated with this instance.
|
AsyncTask |
AsyncTask.setCompletedAt(long completedAt) |
AsyncTask |
AsyncTask.setCreatedAt(long createdAt) |
AsyncTask |
AsyncTask.setCustomKey(String customKey) |
AsyncTask |
AsyncTask.setDataJson(String data) |
AsyncTask |
AsyncTask.setErrorMessage(String errorMessage) |
AsyncTask |
AsyncTask.setExecuteAt(long executeAt) |
AsyncTask |
AsyncTask.setFailedAt(long failedAt) |
AsyncTask |
AsyncTask.setHandler(AsyncTaskHandler handler)
Will use the handler class name, for later reloading, and then convert the handler to JSON
and assign the data to the dataJson field of this task.
|
AsyncTask |
AsyncTask.setHandlerName(String handlerName) |
AsyncTask |
AsyncTask.setLocalMode(String localMode) |
AsyncTask |
AsyncTask.setLockedAt(long lockedAt) |
AsyncTask |
AsyncTask.setLockUuid(String lockUuid) |
AsyncTask |
AsyncTask.setNeverRetry(boolean neverRetry) |
AsyncTask |
AsyncTask.setOriginallyScheduledFor(long originallyScheduledFor) |
AsyncTask |
AsyncTask.setSecret(String secret) |
AsyncTask |
AsyncTask.setTryCount(int tryCount) |
AsyncTask |
AsyncTask.setUpdatedAt(long updatedAt) |
Modifier and Type | Method and Description |
---|---|
PriorityBlockingQueue<AsyncTask> |
AsyncFileCoordinator.getTaskQueue() |
Modifier and Type | Method and Description |
---|---|
int |
AsyncTask.compareTo(AsyncTask o)
Implements the comparable interface to see which task should be executed sooner.
|
void |
AsyncFileCoordinator.enqueue(AsyncTask task) |
abstract void |
AsyncCoordinator.enqueue(AsyncTask task)
Enqueue a task object, normally you enqueue using task handler, which will then
call this method.
|
boolean |
DummyTaskPersister.lockForProcessing(AsyncTask task) |
boolean |
AsyncTaskPersister.lockForProcessing(AsyncTask task)
Lock the task in the datastore.
|
boolean |
AsyncTaskFilePersister.lockForProcessing(AsyncTask task) |
boolean |
AsyncTaskDbPersister.lockForProcessing(AsyncTask task) |
protected boolean |
AsyncFileCoordinator.lockTaskForExecution(AsyncTask task) |
boolean |
DummyTaskPersister.markComplete(AsyncTask task) |
boolean |
AsyncTaskPersister.markComplete(AsyncTask task)
Mark the task as completed.
|
boolean |
AsyncTaskFilePersister.markComplete(AsyncTask task) |
boolean |
AsyncTaskDbPersister.markComplete(AsyncTask task) |
boolean |
AsyncFileCoordinator.markCompleted(AsyncTask task) |
boolean |
AsyncDbCoordinator.markCompleted(AsyncTask task) |
abstract boolean |
AsyncCoordinator.markCompleted(AsyncTask task)
Mark the task as completed.
|
boolean |
DummyTaskPersister.markFailed(AsyncTask task,
Throwable e) |
boolean |
AsyncTaskPersister.markFailed(AsyncTask task,
Throwable e)
Mark the last task execution as failed in the datastore.
|
boolean |
AsyncTaskFilePersister.markFailed(AsyncTask task,
Throwable e) |
boolean |
AsyncTaskDbPersister.markFailed(AsyncTask task,
Throwable e) |
boolean |
AsyncFileCoordinator.markFailed(AsyncTask task,
Throwable throwable) |
boolean |
AsyncDbCoordinator.markFailed(AsyncTask task,
Throwable throwable) |
abstract boolean |
AsyncCoordinator.markFailed(AsyncTask task,
Throwable throwable)
Mark the task as failed.
|
void |
AsyncFileCoordinator.onLoadTaskOnBoot(AsyncTask task) |
abstract void |
AsyncCoordinator.onLoadTaskOnBoot(AsyncTask task)
Called when a task is loaded from the data store during the boot phase.
|
void |
AsyncTaskController.onPostLoadItem(AsyncTask task)
This gets called when we restart the application and reload all the tasks from the /pending folder
|
void |
AsyncFileCoordinator.saveNewTask(AsyncTask task) |
void |
AsyncDbCoordinator.saveNewTask(AsyncTask task) |
protected abstract void |
AsyncCoordinator.saveNewTask(AsyncTask task)
Save a new task to the data store
|
AsyncTaskHandler |
AsyncTaskHandlerBase.setTask(AsyncTask task) |
AsyncTaskHandler |
AsyncTaskHandler.setTask(AsyncTask task) |
void |
AsyncFileCoordinator.updateTask(AsyncTask task,
boolean executeAtChanged) |
void |
AsyncDbCoordinator.updateTask(AsyncTask task,
boolean executeAtChanged) |
abstract void |
AsyncCoordinator.updateTask(AsyncTask task,
boolean executeAtChanged)
Update a task with new information.
|
Constructor and Description |
---|
AsyncTaskExecuteRunnable(AsyncTask task) |
Copyright © 2016. All rights reserved.