248. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/5/2017 12:06:43 PM 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.

248.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ImagingCacheImpl\main\src\java\gov\va\med\imaging\storage\cache\impl PersistentGroupSet.java Mon Dec 4 21:35:26 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ImagingCacheImpl\main\src\java\gov\va\med\imaging\storage\cache\impl PersistentGroupSet.java Mon Dec 4 22:01:33 2017 UTC

248.2 Comparison summary

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

248.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

248.4 Active regular expressions

No regular expressions were active.

248.5 Comparison detail

  1   /**
  2    * 
  3    */
  4   package go v.va.med.i maging.sto rage.cache .impl;
  5  
  6   import gov .va.med.im aging.stor age.cache. EvictionJu dge;
  7   import gov .va.med.im aging.stor age.cache. Group;
  8   import gov .va.med.im aging.stor age.cache. InstanceBy teChannelF actory;
  9   import gov .va.med.im aging.stor age.cache. exceptions .CacheExce ption;
  10  
  11   import jav a.lang.ref .SoftRefer ence;
  12   import jav a.util.Con currentMod ificationE xception;
  13   import jav a.util.Has hSet;
  14   import jav a.util.Set ;
  15   import jav a.util.con current.Ti meUnit;
  16  
  17   import org .apache.lo gging.log4 j.LogManag er;
  18   import org .apache.lo gging.log4 j.Logger;
  19  
  20   /**
  21    * @author         
BECKEC
  22    * 
  23    * An abst ract class  that repr esents a S et of Grou p instance s in a cac he impleme ntation
  24    * that pe rsistent s tores cach e data.  B oth Group  and Region  implement ations hav e
  25    * sets of  Group ins tances.  T his class  makes the  management  of those  instances  easier.
  26    *
  27    * Known D erivations :
  28    * @see go v.va.med.i maging.sto rage.cache .impl.file system.Fil eSystemGro upSet
  29    */
  30   public abs tract clas s Persiste ntGroupSet
  31   extends Pe rsistentSe t<Group>
  32   {
  33           pr ivate Logg er log = L ogManager. getLogger( this.getCl ass());
  34  
  35           //  ========= ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== =
  36           //  Construct ors
  37           //  ========= ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== =
  38           pr otected Pe rsistentGr oupSet(
  39                    Inst anceByteCh annelFacto ry byteCha nnelFactor y,
  40                    int  secondsRea dWaitsForW riteComple tion,
  41                    bool ean setMod ificationT imeOnRead)
  42           {
  43                    supe r(byteChan nelFactory , secondsR eadWaitsFo rWriteComp letion, se tModificat ionTimeOnR ead);
  44           }
  45           
  46           //  ========= ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ======
  47           //  The evict ion group  as determi ned by the  given evi ction judg e
  48           //  ========= ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ======
  49           /* *
  50            *  Return th e Set of G roup insta nces that  are evicta ble accord ing to the
  51            *  given Evi ctionJudge .
  52            *  NOTE: thi s is not a  recursive  method.   The descen dant group s, that ma y be
  53            *  evictable , are not  included i n this lis t.
  54            *  
  55            *  @param ju dge
  56            *  @return
  57            * /
  58           pu blic Set<?  extends G roup> inte rnalEvicta bleGroups( EvictionJu dge<Group>  judge)
  59           {
  60                    Set< Group> evi ctableGrou ps = new H ashSet<Gro up>();
  61                    
  62                    for( SoftRefere nce<? exte nds Group>  childGrou pRef : thi s)
  63                    {
  64                             Group  childGroup  = childGr oupRef.get ();
  65                             
  66                             // the  child gro up may no  longer be  referenced
  67                             if(chi ldGroup !=  null)
  68                             {
  69                                      try
  70                                      {
  71                                               if( judge. isEvictabl e(childGro up) )
  72                                               {
  73                                                       lo g.info("Qu eueing gro up '" + ch ildGroup.g etName() +  " for evi ction.");
  74                                                       ev ictableGro ups.add(ch ildGroup);
  75                                               }
  76                                      } 
  77                                      catch (C acheExcept ion e)
  78                                      {
  79                                               log.error( "CacheExce ption eval uating evi ction crit eria for g roup '" +  childGroup .toString( ) + "', wh ich may ha ve to be m anually de leted.", e );
  80                                      }
  81                             }
  82                    }
  83                    
  84                    retu rn evictab leGroups;
  85           }
  86   }