public interface TaskStorage
| Modifier and Type | Method and Description |
|---|---|
<T> void |
addAuditLog(Task task,
TaskAction<T> taskAction)
Add an action taken by a task to the audit log.
|
void |
addLock(String taskid,
TaskLock taskLock)
Persists lock state in the storage facility.
|
List<Task> |
getActiveTasks()
Returns a list of currently running or pending tasks as stored in the storage facility.
|
List<TaskAction> |
getAuditLogs(String taskid)
Returns all actions taken by a task.
|
List<TaskLock> |
getLocks(String taskid)
Returns a list of locks for a particular task.
|
List<TaskStatus> |
getRecentlyFinishedTaskStatuses()
Returns a list of recently finished task statuses as stored in the storage facility.
|
com.google.common.base.Optional<TaskStatus> |
getStatus(String taskid)
Returns task status as stored in the storage facility.
|
com.google.common.base.Optional<Task> |
getTask(String taskid)
Returns task as stored in the storage facility.
|
void |
insert(Task task,
TaskStatus status)
Adds a task to the storage facility with a particular status.
|
void |
removeLock(String taskid,
TaskLock taskLock)
Removes lock state from the storage facility.
|
void |
setStatus(TaskStatus status)
Persists task status in the storage facility.
|
void insert(Task task, TaskStatus status) throws EntryExistsException
task - task to addstatus - task statusEntryExistsException - if the task ID already existsvoid setStatus(TaskStatus status)
status - task statusvoid addLock(String taskid, TaskLock taskLock)
taskid - task IDtaskLock - lock statevoid removeLock(String taskid, TaskLock taskLock)
taskid - task IDtaskLock - lock statecom.google.common.base.Optional<Task> getTask(String taskid)
getStatus(java.lang.String). Expect that in the future.taskid - task IDcom.google.common.base.Optional<TaskStatus> getStatus(String taskid)
taskid - task ID<T> void addAuditLog(Task task, TaskAction<T> taskAction)
T - task action return typetask - task to record action fortaskAction - task action to recordList<TaskAction> getAuditLogs(String taskid)
taskid - task IDList<Task> getActiveTasks()
List<TaskStatus> getRecentlyFinishedTaskStatuses()
Copyright © 2011–2017. All rights reserved.