public interface ActionDBAccessor
Modifier and Type | Method and Description |
---|---|
void |
abortHostRole(String host,
long requestId,
long stageId,
String role)
Mark the task as to have been aborted
|
void |
abortHostRole(String host,
long requestId,
long stageId,
String role,
String reason)
Mark the task as to have been aborted.
|
void |
abortOperation(long requestId)
Abort all outstanding operations associated with the given request
|
void |
endRequest(long requestId) |
List<Stage> |
getAllStages(long requestId)
Get all stages associated with a single request id
|
List<HostRoleCommand> |
getAllTasksByRequestIds(Collection<Long> requestIds)
Given a list of request ids, get all the tasks that belong to these requests
|
long |
getLastPersistedRequestIdWhenInitialized()
Return the last persisted Request ID as seen when the DBAccessor object
was initialized.
|
Request |
getRequest(long requestId)
Get request object by id
|
Map<Long,String> |
getRequestContext(List<Long> requestIds)
Gets request contexts associated with the list of request id
|
String |
getRequestContext(long requestId)
Gets the request context associated with the request id
|
List<Long> |
getRequestIds()
Get all requests
|
List<Request> |
getRequests(Collection<Long> requestIds)
Gets request objects by ids
|
List<Long> |
getRequestsByStatus(RequestStatus status)
Gets request id of request that are in the specified status
|
List<HostRoleCommand> |
getRequestTasks(long requestId)
Given a request id, get all the tasks that belong to this request
|
Stage |
getStage(String actionId)
Given an action id of the form requestId-stageId, retrieve the Stage
|
List<Stage> |
getStagesByHostRoleStatus(Set<HostRoleStatus> statuses)
Get all stages that contain tasks with specified host role statuses
|
List<Stage> |
getStagesInProgress()
Returns all the pending stages, including queued and not-queued.
|
HostRoleCommand |
getTask(long taskId)
Gets the host role command corresponding to the task id
|
Collection<HostRoleCommand> |
getTasks(Collection<Long> taskIds)
Given a list of task ids, get all the host role commands
|
List<HostRoleCommand> |
getTasksByRequestAndTaskIds(Collection<Long> requestIds,
Collection<Long> taskIds)
Get a list of host role commands where the request id belongs to the input requestIds and
the task id belongs to the input taskIds
|
void |
hostRoleScheduled(Stage s,
String hostname,
String roleStr)
Updates scheduled stage.
|
void |
persistActions(Request request)
Persists all tasks for a given request
|
void |
setSourceScheduleForRequest(long requestId,
long scheduleId)
Updates request with link to source schedule
|
void |
startRequest(long requestId) |
void |
timeoutHostRole(String host,
long requestId,
long stageId,
String role)
Mark the task as to have timed out
|
void |
updateHostRoleState(String hostname,
long requestId,
long stageId,
String role,
CommandReport report)
For the given host, update all the tasks based on the command report
|
void |
updateHostRoleStates(Collection<CommandReport> reports)
Update tasks according to command reports
|
Stage getStage(String actionId)
List<Stage> getAllStages(long requestId)
Request getRequest(long requestId)
requestId
- void abortOperation(long requestId)
void timeoutHostRole(String host, long requestId, long stageId, String role)
List<Stage> getStagesInProgress()
void persistActions(Request request)
request
- request objectvoid startRequest(long requestId)
void endRequest(long requestId)
void setSourceScheduleForRequest(long requestId, long scheduleId)
void updateHostRoleStates(Collection<CommandReport> reports)
void updateHostRoleState(String hostname, long requestId, long stageId, String role, CommandReport report)
void abortHostRole(String host, long requestId, long stageId, String role)
void abortHostRole(String host, long requestId, long stageId, String role, String reason)
long getLastPersistedRequestIdWhenInitialized()
void hostRoleScheduled(Stage s, String hostname, String roleStr)
List<HostRoleCommand> getRequestTasks(long requestId)
List<HostRoleCommand> getAllTasksByRequestIds(Collection<Long> requestIds)
List<HostRoleCommand> getTasksByRequestAndTaskIds(Collection<Long> requestIds, Collection<Long> taskIds)
Collection<HostRoleCommand> getTasks(Collection<Long> taskIds)
List<Stage> getStagesByHostRoleStatus(Set<HostRoleStatus> statuses)
HostRoleCommand getTask(long taskId)
List<Long> getRequestsByStatus(RequestStatus status)
Map<Long,String> getRequestContext(List<Long> requestIds)
String getRequestContext(long requestId)
List<Request> getRequests(Collection<Long> requestIds)
Copyright © 2014. All rights reserved.