Produced by Araxis Merge on 6/11/2019 10:54:11 AM Eastern Daylight 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 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\batchprocess | AbstractConcurrentProcess.java | Wed May 29 15:26:02 2019 UTC |
| 2 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\batchprocess | AbstractConcurrentProcess.java | Mon Jun 10 19:30:04 2019 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 208 |
| 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 | /********* ********** ********** ********** ********** ********** ********* | |
| 2 | * Copyrii ght 2006 V HA. All ri ghts reser ved | |
| 3 | ********* ********** ********** ********** ********** ********** *********/ | |
| 4 | ||
| 5 | package go v.va.med.f w.batchpro cess; | |
| 6 | ||
| 7 | import jav a.util.Ite rator; | |
| 8 | import jav a.util.Set ; | |
| 9 | ||
| 10 | import org .apache.co mmons.lang .Validate; | |
| 11 | ||
| 12 | import gov .va.med.fw .schedulin g.Abstract ScheduledP rocess; | |
| 13 | import gov .va.med.fw .schedulin g.Schedule dProcess; | |
| 14 | import gov .va.med.fw .schedulin g.Schedule dProcessIn vocationCo ntext; | |
| 15 | import gov .va.med.fw .schedulin g.SpawnedS cheduledPr ocess; | |
| 16 | import gov .va.med.fw .security. LoginManag er; | |
| 17 | import gov .va.med.fw .service.s upport.Spa wnedThread Invoker; | |
| 18 | import gov .va.med.fw .util.Inva lidConfigu rationExce ption; | |
| 19 | ||
| 20 | /** | |
| 21 | * Abstrac t implemen tation tha t allows f or concurr ent proces sing of "o ther" | |
| 22 | * instanc es of Sche duledProce ss. Useful for large volume pr ocessing. | |
| 23 | * | |
| 24 | * Created Apr 28, 2 006 12:19: 57 PM | |
| 25 | * comment Donna | |
| 26 | * @author DNS DN S
|
|
| 27 | */ | |
| 28 | public cla ss Abstrac tConcurren tProcess e xtends Abs tractSched uledProces s { | |
| 29 | pr ivate Logi nManager l oginManage r; | |
| 30 | pr ivate Set processes; | |
| 31 | ||
| 32 | /* | |
| 33 | * (non-Java doc) | |
| 34 | * | |
| 35 | * @see | |
| 36 | * gov.va.me d.fw.sched uling.Abst ractSchedu ledProcess #executePr ocess(java | |
| 37 | * .lang.Obj ect) | |
| 38 | * / | |
| 39 | pr otected vo id execute Process(Sc heduledPro cessInvoca tionContex t invConte xt) throws Exception { | |
| 40 | // i terate thr ough proce sses and l aunch in t hreads | |
| 41 | Iter ator itr = getProces ses().iter ator(); | |
| 42 | Sche duledProce ss targetP rocess = n ull; | |
| 43 | Spaw nedThreadI nvoker inv oker; | |
| 44 | Spaw nedSchedul edProcess spawnedPro cess; | |
| 45 | whil e (itr.has Next()) { | |
| 46 | target Process = (Scheduled Process) i tr.next(); | |
| 47 | ||
| 48 | spawne dProcess = new Spawn edSchedule dProcess() ; | |
| 49 | spawne dProcess.s etContext( invContext ); | |
| 50 | spawne dProcess.s etProcess( targetProc ess); | |
| 51 | spawne dProcess.s etAuditInf o(targetPr ocess.getA uditInfo(i nvContext) ); | |
| 52 | spawne dProcess.s etLoginMan ager(login Manager); | |
| 53 | ||
| 54 | invoke r = new Sp awnedThrea dInvoker(s pawnedProc ess, false ); | |
| 55 | invoke r.execute( ); | |
| 56 | } | |
| 57 | } | |
| 58 | ||
| 59 | pu blic void interrupt( ) { | |
| 60 | supe r.interrup t(); | |
| 61 | ||
| 62 | // i nterrupt a ll spawned processes | |
| 63 | Iter ator itr = getProces ses().iter ator(); | |
| 64 | whil e (itr.has Next()) { | |
| 65 | ((Sche duledProce ss) itr.ne xt()).inte rrupt(); | |
| 66 | } | |
| 67 | } | |
| 68 | ||
| 69 | /* * | |
| 70 | * @return R eturns the processes . | |
| 71 | * / | |
| 72 | pu blic Set g etProcesse s() { | |
| 73 | retu rn process es; | |
| 74 | } | |
| 75 | ||
| 76 | /* * | |
| 77 | * @param pr ocesses | |
| 78 | * The proc esses to s et. | |
| 79 | * / | |
| 80 | pu blic void setProcess es(Set pro cesses) { | |
| 81 | this .processes = process es; | |
| 82 | } | |
| 83 | ||
| 84 | pu blic void afterPrope rtiesSet() { | |
| 85 | Vali date.notNu ll(loginMa nager, "A LoginManag er is need ed for the spawned t hreads"); | |
| 86 | if ( processes == null || processes .isEmpty() ) | |
| 87 | throw new Invali dConfigura tionExcept ion( | |
| 88 | "Must conf igure at l east one S cheduledPr ocess to l aunch"); | |
| 89 | } | |
| 90 | ||
| 91 | /* * | |
| 92 | * @return R eturns the loginMana ger. | |
| 93 | * / | |
| 94 | pu blic Login Manager ge tLoginMana ger() { | |
| 95 | retu rn loginMa nager; | |
| 96 | } | |
| 97 | ||
| 98 | /* * | |
| 99 | * @param lo ginManager | |
| 100 | * The logi nManager t o set. | |
| 101 | * / | |
| 102 | pu blic void setLoginMa nager(Logi nManager l oginManage r) { | |
| 103 | this .loginMana ger = logi nManager; | |
| 104 | } | |
| 105 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.