You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-dev@jakarta.apache.org by hc...@apache.org on 2005/01/27 12:05:29 UTC

cvs commit: jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/soft SoftRefCacheCleaner.java

hchar       2005/01/27 03:05:29

  Modified:    sandbox/yajcache/src/org/apache/jcs/yajcache/soft
                        SoftRefCacheCleaner.java
  Log:
  wip: likely to be removed soon
  
  Revision  Changes    Path
  1.3       +6 -4      jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/soft/SoftRefCacheCleaner.java
  
  Index: SoftRefCacheCleaner.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/soft/SoftRefCacheCleaner.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SoftRefCacheCleaner.java	24 Jan 2005 10:33:22 -0000	1.2
  +++ SoftRefCacheCleaner.java	27 Jan 2005 11:05:29 -0000	1.3
  @@ -20,12 +20,14 @@
   import org.apache.commons.lang.builder.ToStringBuilder;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -import org.apache.jcs.yajcache.annotate.*;
  +import org.apache.jcs.yajcache.lang.annotation.*;
  +import org.apache.jcs.yajcache.lang.ref.KeyedSoftReference;
   /**
    *
    * @author Hanson Char
    */
  -@CopyRightApache
  +// @CopyRightApache
  +// http://www.netbeans.org/issues/show_bug.cgi?id=53704
   enum SoftRefCacheCleaner {
       inst;
       private static final boolean debug = true;
  @@ -38,14 +40,14 @@
       private volatile int countDataRaceAndRemovedByOthers;
       private volatile int countBye;
       
  -    <V> void cleanupKey(@NonNullable Map<String, KeyedSoftRef<V>> map, @NonNullable String key) 
  +    <V> void cleanupKey(@NonNullable Map<String, KeyedSoftReference<V>> map, @NonNullable String key) 
       {
           V val = null;
           // already garbage collected.  So try to clean up the key.
           if (debug)
               log.debug("Try to clean up the key");
           this.countTryKeyClean++;
  -        KeyedSoftRef<V> oldRef = map.remove(key);
  +        KeyedSoftReference<V> oldRef = map.remove(key);
           // If oldRef is null, the key has just been 
           // cleaned up by another thread.
           if (oldRef == null) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org