public class AsyncTaskDbPersister extends DbPersister<AsyncTask> implements AsyncTaskPersister
| Constructor and Description |
|---|
AsyncTaskDbPersister() |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteOldTasks()
Delete all tasks from the database that were completed more than 40 days ago
|
AsyncTask |
findAndLockNextTask(Long now) |
AsyncTask |
findAndLockNextTask(Long now,
int depth) |
boolean |
lockForProcessing(AsyncTask task)
Lock the task in the datastore.
|
boolean |
markComplete(AsyncTask task)
Mark the task as completed.
|
boolean |
markFailed(AsyncTask task,
Throwable e)
Mark the last task execution as failed in the datastore.
|
attachWatcher, checkNeedsSync, fetchAll, fetchOne, fetchOne, filterChain, getBucketSyncedKey, getTableName, hardDelete, init, isDbBacked, onPreRead, persist, syncFromDatabase, update, watchEventCallbackgetBucket, getItemController, getModelClass, getStash, handleFetchOne, onFetchOne, reloadIfNewer, setBucket, setItemController, setModelClass, setStashpublic AsyncTaskDbPersister()
public AsyncTask findAndLockNextTask(Long now)
public AsyncTask findAndLockNextTask(Long now, int depth)
public boolean markFailed(AsyncTask task, Throwable e)
AsyncTaskPersistermarkFailed in interface AsyncTaskPersisterpublic boolean markComplete(AsyncTask task)
AsyncTaskPersistermarkComplete in interface AsyncTaskPersisterpublic boolean lockForProcessing(AsyncTask task)
AsyncTaskPersisterlockForProcessing in interface AsyncTaskPersisterpublic void deleteOldTasks()
AsyncTaskPersisterdeleteOldTasks in interface AsyncTaskPersisterCopyright © 2016. All rights reserved.