-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
胡贵
committed
Jun 13, 2015
1 parent
7bb95cd
commit 218ac0c
Showing
30 changed files
with
362 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
lts-core/src/main/java/com/lts/core/domain/JobWrapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.lts.core.domain; | ||
|
||
/** | ||
* @author Robert HG (254963746@qq.com) on 6/13/15. | ||
*/ | ||
public class JobWrapper { | ||
|
||
private String jobId; | ||
|
||
private Job job; | ||
|
||
public JobWrapper(String jobId, Job job) { | ||
this.jobId = jobId; | ||
this.job = job; | ||
} | ||
|
||
public JobWrapper() { | ||
} | ||
|
||
public String getJobId() { | ||
return jobId; | ||
} | ||
|
||
public void setJobId(String jobId) { | ||
this.jobId = jobId; | ||
} | ||
|
||
public Job getJob() { | ||
return job; | ||
} | ||
|
||
public void setJob(Job job) { | ||
this.job = job; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "JobWrapper{" + | ||
"jobId='" + jobId + '\'' + | ||
", job=" + job + | ||
'}'; | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
lts-core/src/main/java/com/lts/core/domain/TaskTrackerJobResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package com.lts.core.domain; | ||
|
||
import com.lts.core.commons.utils.JSONUtils; | ||
|
||
/** | ||
* @author Robert HG (254963746@qq.com) on 8/19/14. | ||
* TaskTracker 任务执行结果 | ||
*/ | ||
public class TaskTrackerJobResult { | ||
|
||
private JobWrapper jobWrapper; | ||
|
||
// 执行成功还是失败 | ||
private boolean success; | ||
|
||
private String msg; | ||
// 任务完成时间 | ||
private Long time; | ||
|
||
public JobWrapper getJobWrapper() { | ||
return jobWrapper; | ||
} | ||
|
||
public void setJobWrapper(JobWrapper jobWrapper) { | ||
this.jobWrapper = jobWrapper; | ||
} | ||
|
||
public boolean isSuccess() { | ||
return success; | ||
} | ||
|
||
public void setSuccess(boolean success) { | ||
this.success = success; | ||
} | ||
|
||
public String getMsg() { | ||
return msg; | ||
} | ||
|
||
public void setMsg(String msg) { | ||
this.msg = msg; | ||
} | ||
|
||
public Long getTime() { | ||
return time; | ||
} | ||
|
||
public void setTime(Long time) { | ||
this.time = time; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return JSONUtils.toJSONString(this); | ||
} | ||
} |
1 change: 0 additions & 1 deletion
1
lts-core/src/main/java/com/lts/core/failstore/berkeleydb/BerkeleydbFailStore.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
lts-core/src/main/java/com/lts/core/protocol/command/TtJobFinishedRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package com.lts.core.protocol.command; | ||
|
||
import com.lts.core.domain.TaskTrackerJobResult; | ||
import com.lts.remoting.annotation.NotNull; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* @author Robert HG (254963746@qq.com) on 8/16/14. | ||
* TaskTracker Job finished request command body | ||
*/ | ||
public class TtJobFinishedRequest extends AbstractCommandBody { | ||
/** | ||
* 是否接受新任务 | ||
*/ | ||
private boolean receiveNewJob = false; | ||
|
||
@NotNull | ||
private List<TaskTrackerJobResult> taskTrackerJobResults; | ||
|
||
// 是否是重发(重发是批量发) | ||
private boolean reSend = false; | ||
|
||
public boolean isReSend() { | ||
return reSend; | ||
} | ||
|
||
public void setReSend(boolean reSend) { | ||
this.reSend = reSend; | ||
} | ||
|
||
public boolean isReceiveNewJob() { | ||
return receiveNewJob; | ||
} | ||
|
||
public void setReceiveNewJob(boolean receiveNewJob) { | ||
this.receiveNewJob = receiveNewJob; | ||
} | ||
|
||
public List<TaskTrackerJobResult> getTaskTrackerJobResults() { | ||
return taskTrackerJobResults; | ||
} | ||
|
||
public void setTaskTrackerJobResults(List<TaskTrackerJobResult> taskTrackerJobResults) { | ||
this.taskTrackerJobResults = taskTrackerJobResults; | ||
} | ||
|
||
public void addJobResult(TaskTrackerJobResult taskTrackerJobResult) { | ||
if (taskTrackerJobResults == null) { | ||
taskTrackerJobResults = new ArrayList<TaskTrackerJobResult>(); | ||
} | ||
taskTrackerJobResults.add(taskTrackerJobResult); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
lts-example/src/main/java/com/lts/example/support/JobFinishedHandlerImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.