Produced by Araxis Merge on 2/7/2017 12:14:07 PM Eastern Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
# | Location | File | Last Modified |
---|---|---|---|
1 | cpss.zip\cpss\src\main\java\gov\va\cpss\job | CbssVerifySiblingJobNotRunningTasklet.java | Wed Feb 1 21:07:26 2017 UTC |
2 | cpss.zip\cpss\src\main\java\gov\va\cpss\job | CbssVerifySiblingJobNotRunningTasklet.java | Fri Feb 3 20:54:21 2017 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 144 |
Changed | 1 | 2 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
Whitespace | |
---|---|
Character case | Differences in character case are significant |
Line endings | Differences in line endings (CR and LF characters) are ignored |
CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
1 | package go v.va.cpss. job; | |
2 | ||
3 | import jav a.util.Arr ayList; | |
4 | import jav a.util.Lis t; | |
5 | ||
6 | import gov .va.cpss.m odel.Batch Item; | |
7 | import gov .va.cpss.m odel.Batch Job; | |
8 | import gov .va.cpss.m odel.Batch Status; | |
9 | import gov .va.cpss.s ervice.Bat chService; | |
10 | ||
11 | /** | |
12 | * Report if okay to proceed p rocessing by checkin g if the s ibling job is not | |
13 | * current ly running . | |
14 | * | |
15 | * @author D N S | |
16 | */ | |
17 | public cla ss CbssVer ifySibling JobNotRunn ingTasklet extends C bssBaseRet ryTasklet { | |
18 | ||
19 | pr ivate List <String> j obNameList = new Arr ayList<>() ; | |
20 | ||
21 | pr ivate Batc hService b atchServic e; | |
22 | ||
23 | pu blic void setJobName (String jo bName) { | |
24 | jobN ameList.ad d(jobName) ; | |
25 | } | |
26 | ||
27 | pu blic void setJobName List(List< String> jo bNameList) { | |
28 | this .jobNameLi st = jobNa meList; | |
29 | } | |
30 | ||
31 | pu blic Batch Service ge tBatchServ ice() { | |
32 | retu rn batchSe rvice; | |
33 | } | |
34 | ||
35 | pu blic void setBatchSe rvice(Batc hService b atchServic e) { | |
36 | this .batchServ ice = batc hService; | |
37 | } | |
38 | ||
39 | @O verride | |
40 | pr otected bo olean exec uteLogic() { | |
41 | ||
42 | bool ean noSibl ingsRunnin g = true; | |
43 | ||
44 | for (String jo bName : jo bNameList) { | |
45 | ||
46 | // Get the batch job. | |
47 | final BatchJob j ob = batch Service.ge tBatchJobB yName(jobN ame); | |
48 | ||
49 | if (jo b != null) { | |
50 | ||
51 | // Get m ost recent batch ite m. | |
52 | final Ba tchItem jo bBatchItem = batchSe rvice.getB atchItemFo rJob(job); | |
53 | ||
54 | // Retur n true if no record of a run ( null) or i f not runn ing. | |
55 | if (jobB atchItem.g etRun() == null) { | |
56 | continue; | |
57 | } else i f (jobBatc hItem.getR un().getBa tchStatus( ).getJobSt atus() == BatchStatu s.JobStatu s.RUNNING) { | |
58 | taskletLog ger.info(" Job " + jo bName + " is running "); | |
59 | noSiblings Running = false; | |
60 | break; | |
61 | } | |
62 | } else { | |
63 | ||
64 | taskletL ogger.erro r("Job " + jobName + " not fou nd; check configurat ion"); | |
65 | noSiblin gsRunning = false; | |
66 | break; | |
67 | } | |
68 | } | |
69 | ||
70 | retu rn noSibli ngsRunning ; | |
71 | } | |
72 | ||
73 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.