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, watchEventCallback
getBucket, getItemController, getModelClass, getStash, handleFetchOne, onFetchOne, reloadIfNewer, setBucket, setItemController, setModelClass, setStash
public AsyncTaskDbPersister()
public AsyncTask findAndLockNextTask(Long now)
public AsyncTask findAndLockNextTask(Long now, int depth)
public boolean markFailed(AsyncTask task, Throwable e)
AsyncTaskPersister
markFailed
in interface AsyncTaskPersister
public boolean markComplete(AsyncTask task)
AsyncTaskPersister
markComplete
in interface AsyncTaskPersister
public boolean lockForProcessing(AsyncTask task)
AsyncTaskPersister
lockForProcessing
in interface AsyncTaskPersister
public void deleteOldTasks()
AsyncTaskPersister
deleteOldTasks
in interface AsyncTaskPersister
Copyright © 2016. All rights reserved.