236. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/13/2018 10:35:26 AM 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.

236.1 Files compared

# Location File Last Modified
1 v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\fw\cache EHCacheStrategy.java Fri Dec 7 17:36:18 2018 UTC
2 v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\fw\cache EHCacheStrategy.java Wed Dec 12 19:46:45 2018 UTC

236.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 168
Changed 1 2
Inserted 0 0
Removed 0 0

236.3 Comparison options

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

236.4 Active regular expressions

No regular expressions were active.

236.5 Comparison detail

  1   /********* ********** ********** ********** ********** ********** *********
  2    * Copyrii ght 2004 V HA. All ri ghts reser ved
  3    ********* ********** ********** ********** ********** ********** *********/
  4  
  5   package go v.va.med.f w.cache;
  6  
  7   // Librari es 
  8   import net .sf.ehcach e.Cache;
  9   import net .sf.ehcach e.Element;
  10  
  11   import org .apache.co mmons.lang .Validate;
  12  
  13   import gov .va.med.fw .service.A bstractCom ponent;
  14  
  15   /**
  16    * A concr ete cache  strategy t hat uses E HCache to  cache an i tem
  17    * 
  18    * @author   DN S
  19    * 
  20    */
  21   public cla ss EHCache Strategy e xtends Abs tractCompo nent imple ments Cach eStrategy  {
  22  
  23           /* *
  24            *  An instan ce of seri alVersionU ID
  25            * /
  26           pr ivate stat ic final l ong serial VersionUID  = -831327 3199973981 560L;
  27  
  28           /* *
  29            *  An instan ce of cach e
  30            * /
  31           pr ivate Cach e cache =  null;
  32  
  33           /* *
  34            *  A default  construct or
  35            * /
  36           pu blic EHCac heStrategy () {
  37                    supe r();
  38                    
  39                    net. sf.ehcache .CacheMana ger cm = n et.sf.ehca che.CacheM anager.get Instance() ;
  40                    cach e = cm.get Cache("cch t");
  41           }
  42  
  43           pu blic void  setCache(C ache cache ) {
  44                    this .cache = c ache;
  45           }
  46  
  47           /* *
  48            *  @see gov. va.med.fw. cache.Cach eStrategy# getItem(ja va.lang.Ob ject)
  49            * /
  50           pu blic Objec t getItem( Object key ) {
  51                    Vali date.notNu ll(key, "A  key to lo ok up a ca che item m ust not be  null");
  52                    Elem ent item =  this.cach e.get(key) ;
  53                    retu rn item !=  null ? it em.getObje ctValue()  : null;
  54           }
  55  
  56           /* *
  57            *  @see gov. va.med.fw. cache.Cach eStrategy# removeItem (java.lang .Object)
  58            * /
  59           pu blic Objec t removeIt em(Object  key) {
  60                    Vali date.notNu ll(key, "A  key to lo ok up a ca che item m ust not be  null");
  61  
  62                    Obje ct value =  null;
  63                    Elem ent item =  this.cach e.get(key) ;
  64                    if ( item != nu ll) {
  65                             value  = item.get ObjectKey( );
  66                             this.c ache.remov e(item.get Key());
  67                    }
  68                    retu rn value;
  69           }
  70  
  71           /* *
  72            *  @see gov. va.med.fw. cache.Cach eStrategy# cacheItem( java.lang. Object,
  73            *       java .lang.Obje ct)
  74            * /
  75           pu blic void  cacheItem( Object key , Object v alue) {
  76                    this .cache.put (new Eleme nt(key, va lue));
  77           }
  78  
  79           /* *
  80            *  @see gov. va.med.fw. cache.Cach eStrategy# containsIt em(java.la ng.Object)
  81            * /
  82           pu blic boole an contain sItem(Obje ct key) {
  83                    retu rn (this.c ache.get(k ey) != nul l);
  84           }
  85   }