|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cluster5.server.datastorage.dao.TaskDao
public class TaskDao
Constructor Summary | |
---|---|
TaskDao()
|
Method Summary | |
---|---|
void |
cleanTasksProcessedBy(java.lang.Long terminalId)
Resets all tasks processed by the specified terminal to NEW with null allocation tag. |
boolean |
deleteTask(java.lang.Long taskId)
Deletes a task indentified by its ID from database. |
Task |
getByAllocationTag(java.lang.String allocationTag)
|
Task |
getById(java.lang.Long taskId)
|
Task.Status |
getStatus(java.lang.Long taskId)
|
java.util.List<Task.Status> |
getTaskStatuses(java.lang.Long projectId)
Return distinct list of statuses of tasks for specified project id. |
java.util.List<java.lang.Long> |
listTaskIds(java.lang.Long projectId)
|
Task |
save(Task task)
Saves or updates a Task in(to) the database. |
int |
tagPendingTask(java.lang.String allocationTag)
Tags one or more tasks awaiting to be processed with specified allocationTag so we then know which one(s) have been reserved. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TaskDao()
Method Detail |
---|
public Task getById(java.lang.Long taskId)
public Task.Status getStatus(java.lang.Long taskId)
public java.util.List<java.lang.Long> listTaskIds(java.lang.Long projectId)
public boolean deleteTask(java.lang.Long taskId)
taskId
-
public Task save(Task task)
task
- to be saved
public int tagPendingTask(java.lang.String allocationTag)
allocationTag
-
public Task getByAllocationTag(java.lang.String allocationTag)
allocationTag
-
Task
by specified allocationTag or null if there is no
such onepublic java.util.List<Task.Status> getTaskStatuses(java.lang.Long projectId)
Project
has finished or not some Task
s are still
being processed.
projectId
-
public void cleanTasksProcessedBy(java.lang.Long terminalId)
terminalId
- ID of a terminal that just shut down or crashed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |