public class AsyncTaskFilePersister extends JsonFilePersister implements AsyncTaskPersister
sortDirection, sortField
Constructor and Description |
---|
AsyncTaskFilePersister() |
Modifier and Type | Method and Description |
---|---|
void |
attachWatcher()
The watcher for JsonTaskPersister only watches the manual entry folder.
|
void |
deleteOldTasks()
Delete all tasks from the database that were completed more than 40 days ago
|
List |
fetchAll()
Fetch all the items from the underlying data store.
|
String |
fullFilePathForObj(Model model) |
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.
|
String |
relativeFilePathForObj(Model model) |
void |
watchEventCallback(String relativePath)
This callback occurs when the watcher finds a new file added to manual retry
We load the task, delete the original file, then re-enqueue the task
|
doFetchOne, getFileExtensions, persist
fetchOne, fetchOne, fetchOne, filterChain, fullFilePathForId, getBucketFolderPath, getFileToIdMap, getIdToFileMap, getItemArrayName, hardDelete, init, isManyItemsPerFile, makeIdFromFilePath, makePathForObject, matchesExtension, onPostLoadFromFile, reloadIfNewer, setBucketFolderPath, setFileToIdMap, setIdToFileMap, setItemArrayName, setManyItemsPerFile
getBucket, getItemController, getModelClass, getStash, handleFetchOne, isDbBacked, onFetchOne, onPreRead, setBucket, setItemController, setModelClass, setStash
public AsyncTaskFilePersister()
public List fetchAll()
Persister
fetchAll
in interface Persister
fetchAll
in class FilePersisterBase
public void watchEventCallback(String relativePath)
watchEventCallback
in interface Persister
watchEventCallback
in class FilePersisterBase
relativePath
- public void attachWatcher()
attachWatcher
in interface Persister
attachWatcher
in class FilePersisterBase
public boolean lockForProcessing(AsyncTask task)
AsyncTaskPersister
lockForProcessing
in interface AsyncTaskPersister
public boolean markComplete(AsyncTask task)
AsyncTaskPersister
markComplete
in interface AsyncTaskPersister
public boolean markFailed(AsyncTask task, Throwable e)
AsyncTaskPersister
markFailed
in interface AsyncTaskPersister
public String fullFilePathForObj(Model model)
fullFilePathForObj
in class FilePersisterBase
public void deleteOldTasks()
AsyncTaskPersister
deleteOldTasks
in interface AsyncTaskPersister
public String relativeFilePathForObj(Model model)
relativeFilePathForObj
in class FilePersisterBase
Copyright © 2016. All rights reserved.