Produced by Araxis Merge on 11/14/2017 6:57:20 AM Central 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 | cbs.zip\cbs\cbs\src\main\java\gov\va\cpss\job | CbssVerifySiblingJobNotRunningTasklet.java | Thu Nov 9 14:19:48 2017 UTC |
| 2 | cbs.zip\cbs\cbs\src\main\java\gov\va\cpss\job | CbssVerifySiblingJobNotRunningTasklet.java | Tue Nov 14 12:25:59 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 152 |
| 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 SrcType; | |
| 9 | import gov .va.cpss.m odel.Batch Status; | |
| 10 | import gov .va.cpss.s ervice.Bat chService; | |
| 11 | ||
| 12 | /** | |
| 13 | * Report if okay to proceed p rocessing by checkin g if the s ibling job is not | |
| 14 | * current ly running . | |
| 15 | * | |
| 16 | * @author DN S BROWNL | |
| 17 | */ | |
| 18 | public cla ss CbssVer ifySibling JobNotRunn ingTasklet extends C bssBaseRet ryTasklet { | |
| 19 | ||
| 20 | pr ivate List <String> j obNameList = new Arr ayList<>() ; | |
| 21 | // Source Typ e is used determine between ba tch Types 1 is for C BSS Jobs | |
| 22 | pr ivate stat ic int sou rceType; | |
| 23 | pr ivate Batc hService b atchServic e; | |
| 24 | ||
| 25 | pu blic void setJobName (String jo bName) { | |
| 26 | jobN ameList.ad d(jobName) ; | |
| 27 | } | |
| 28 | ||
| 29 | pu blic void setJobName List(List< String> jo bNameList) { | |
| 30 | this .jobNameLi st = jobNa meList; | |
| 31 | } | |
| 32 | ||
| 33 | pu blic Batch Service ge tBatchServ ice() { | |
| 34 | retu rn batchSe rvice; | |
| 35 | } | |
| 36 | ||
| 37 | pu blic void setBatchSe rvice(Batc hService b atchServic e) { | |
| 38 | this .batchServ ice = batc hService; | |
| 39 | } | |
| 40 | ||
| 41 | @O verride | |
| 42 | pr otected bo olean exec uteLogic() { | |
| 43 | ||
| 44 | bool ean noSibl ingsRunnin g = true; | |
| 45 | ||
| 46 | sour ceType = b atchServic e.getBatch SrcTypeId( BatchSrcTy pe.SrcType .CBS); | |
| 47 | ||
| 48 | for (String jo bName : jo bNameList) { | |
| 49 | ||
| 50 | // Get the batch job. | |
| 51 | final BatchJob j ob = batch Service.ge tBatchJobB yNameAndSo urceType(j obName, so urceType); | |
| 52 | ||
| 53 | if (jo b != null) { | |
| 54 | ||
| 55 | // Get m ost recent batch ite m. | |
| 56 | final Ba tchItem jo bBatchItem = batchSe rvice.getB atchItemFo rJob(job); | |
| 57 | ||
| 58 | // Retur n true if no record of a run ( null) or i f not runn ing. | |
| 59 | if (jobB atchItem.g etRun() == null) { | |
| 60 | continue; | |
| 61 | } else i f (jobBatc hItem.getR un().getBa tchStatus( ).getJobSt atus() == BatchStatu s.JobStatu s.RUNNING) { | |
| 62 | taskletLog ger.info(" Job " + jo bName + " is running "); | |
| 63 | noSiblings Running = false; | |
| 64 | break; | |
| 65 | } | |
| 66 | } else { | |
| 67 | ||
| 68 | taskletL ogger.erro r("Job " + jobName + " not fou nd; check configurat ion"); | |
| 69 | noSiblin gsRunning = false; | |
| 70 | break; | |
| 71 | } | |
| 72 | } | |
| 73 | ||
| 74 | retu rn noSibli ngsRunning ; | |
| 75 | } | |
| 76 | ||
| 77 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.