public class TaskDao extends Object
| 构造器和说明 |
|---|
TaskDao(H2ConnectionPool h2CP) |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
batchDeleteTasks(long jobInstanceId,
List<Long> taskIds) |
int |
batchInsert(List<com.alibaba.schedulerx.protocol.Worker.MasterStartContainerRequest> containers,
String workerId,
String workerAddr) |
int |
batchUpdateStatus(long jobInstanceId,
int status,
String workerId,
String workerAddr) |
int |
batchUpdateStatus(long jobInstanceId,
List<Long> taskIdList,
int status) |
void |
createTable() |
int |
deleteByJobInstanceId(long jobInstanceId) |
void |
dropTable() |
boolean |
exist(long jobInstanceId)
whether exist at least 1 record with 'job_instance_id' = jobInstance.
|
List<Long> |
getDistinctInstanceIds() |
TaskStatistics |
getTaskStatistics() |
int |
insert(long jobId,
long jobInstanceId,
long taskId,
String taskName,
com.google.protobuf.ByteString taskBody) |
List<Integer> |
queryStatus(long jobInstanceId) |
long |
queryTaskCount(long jobInstanceId) |
List<TaskSnapshot> |
queryTaskList(long jobInstanceId,
int status,
int pageSize) |
int |
updateStatus(long jobInstanceId,
List<Long> taskIds,
int status,
String workerId,
String workerAddr) |
int |
updateStatus(long jobInstanceId,
long taskId,
int status,
String workerAddr) |
int |
updateWorker(long jobInstanceId,
long taskId,
String workerId,
String workerAddr) |
public TaskDao(H2ConnectionPool h2CP)
public int insert(long jobId,
long jobInstanceId,
long taskId,
String taskName,
com.google.protobuf.ByteString taskBody)
throws SQLException
SQLExceptionpublic int batchInsert(List<com.alibaba.schedulerx.protocol.Worker.MasterStartContainerRequest> containers, String workerId, String workerAddr) throws SQLException
SQLExceptionpublic TaskStatistics getTaskStatistics() throws SQLException
SQLExceptionpublic int updateStatus(long jobInstanceId,
long taskId,
int status,
String workerAddr)
throws SQLException
SQLExceptionpublic int updateStatus(long jobInstanceId,
List<Long> taskIds,
int status,
String workerId,
String workerAddr)
throws SQLException
SQLExceptionpublic int batchUpdateStatus(long jobInstanceId,
List<Long> taskIdList,
int status)
throws SQLException
SQLExceptionpublic List<Long> getDistinctInstanceIds() throws SQLException
SQLExceptionpublic int batchUpdateStatus(long jobInstanceId,
int status,
String workerId,
String workerAddr)
throws SQLException
SQLExceptionpublic int updateWorker(long jobInstanceId,
long taskId,
String workerId,
String workerAddr)
throws SQLException
SQLExceptionpublic List<TaskSnapshot> queryTaskList(long jobInstanceId, int status, int pageSize) throws SQLException
SQLExceptionpublic List<Integer> queryStatus(long jobInstanceId) throws SQLException
SQLExceptionpublic long queryTaskCount(long jobInstanceId)
throws SQLException
SQLExceptionpublic boolean exist(long jobInstanceId)
throws SQLException
jobInstanceId - SQLExceptionpublic int deleteByJobInstanceId(long jobInstanceId)
throws SQLException
SQLExceptionpublic int batchDeleteTasks(long jobInstanceId,
List<Long> taskIds)
throws SQLException
SQLExceptionCopyright © 2021. All rights reserved.