Produced by Araxis Merge on 6/11/2019 10:54:12 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\cache | TriggerEventCacheManager.java | Wed May 29 15:26:02 2019 UTC |
| 2 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\cache | TriggerEventCacheManager.java | Mon Jun 10 19:30:05 2019 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 156 |
| 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 2005 V HA. All ri ghts reser ved | |
| 3 | ********* ********** ********** ********** ********** ********** *********/ | |
| 4 | ||
| 5 | package go v.va.med.f w.cache; | |
| 6 | ||
| 7 | import jav a.util.Has hSet; | |
| 8 | import jav a.util.Ite rator; | |
| 9 | import jav a.util.Set ; | |
| 10 | ||
| 11 | import org .springfra mework.ste reotype.Co mponent; | |
| 12 | ||
| 13 | import gov .va.med.fw .security. SecurityCo ntextHelpe r; | |
| 14 | import gov .va.med.fw .service.t rigger.Tri ggerEvent; | |
| 15 | ||
| 16 | /** | |
| 17 | * Initial javadoc f or class T riggerEven tCacheMana ger. TODO - Add cont ent here | |
| 18 | * | |
| 19 | * Created Nov 3, 20 05 12:29:0 9 PM | |
| 20 | * | |
| 21 | * @author DNS DN S
|
|
| 22 | */ | |
| 23 | @Component | |
| 24 | public cla ss Trigger EventCache Manager ex tends Abst ractCacheM anager { | |
| 25 | /* * | |
| 26 | * An instan ce of seri alVersionU ID | |
| 27 | * / | |
| 28 | pr ivate stat ic final l ong serial VersionUID = -437080 3641246991 293L; | |
| 29 | pu blic stati c final St ring TRIGG ER_EVENTS_ KEY = Trig gerEventCa cheManager .class.get Name() | |
| 30 | + ".TR IGGER_EVEN TS"; | |
| 31 | ||
| 32 | /* * | |
| 33 | * A default construct or | |
| 34 | * / | |
| 35 | pu blic Trigg erEventCac heManager( ) { | |
| 36 | supe r(); | |
| 37 | } | |
| 38 | ||
| 39 | /* * | |
| 40 | * Stores cr eated (but not yet r outed) Tri ggerEvents to thread bound sto rage | |
| 41 | * / | |
| 42 | pu blic void storeTrigg erEvents(S et trigger Events) { | |
| 43 | Iter ator itr = triggerEv ents != nu ll ? trigg erEvents.i terator() : null; | |
| 44 | Set cachedEven ts = null; // ensure s no dupli cates | |
| 45 | Trig gerEvent e vent = nul l; | |
| 46 | whil e (itr != null && it r.hasNext( )) { | |
| 47 | try { | |
| 48 | event = (TriggerEv ent) itr.n ext(); | |
| 49 | synchron ized (this ) { | |
| 50 | cachedEven ts = (Set) getItem(T RIGGER_EVE NTS_KEY); | |
| 51 | if (cached Events == null) { | |
| 52 | ca chedEvents = new Has hSet(); | |
| 53 | ca cheItem(TR IGGER_EVEN TS_KEY, ca chedEvents ); | |
| 54 | } | |
| 55 | } | |
| 56 | // set i nitiater o n TriggerE vent | |
| 57 | event.se tInitiater (SecurityC ontextHelp er.getSecu rityContex t().getUse rPrincipal () | |
| 58 | .g etUserCred entials()) ; | |
| 59 | ||
| 60 | cachedEv ents.add(e vent); | |
| 61 | } catc h (ClassCa stExceptio n e) { | |
| 62 | throw ne w IllegalA rgumentExc eption("Ex pected obj ect of typ e TriggerE vent"); | |
| 63 | } | |
| 64 | } | |
| 65 | } | |
| 66 | ||
| 67 | /* * Removes any Trigge rEvent's b ound to Th read */ | |
| 68 | pu blic Set r emoveTrigg erEvents() { | |
| 69 | retu rn (Set) r emoveItem( TRIGGER_EV ENTS_KEY); | |
| 70 | } | |
| 71 | ||
| 72 | pu blic boole an hasTrig gerEvents( ) { | |
| 73 | retu rn contain sItem(TRIG GER_EVENTS _KEY); | |
| 74 | } | |
| 75 | ||
| 76 | pu blic Set g etTriggerE vents() { | |
| 77 | retu rn (Set) g etItem(TRI GGER_EVENT S_KEY); | |
| 78 | } | |
| 79 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.