1 25 package org.ofbiz.base.util.cache; 26 27 import java.lang.ref.SoftReference ; 28 import java.lang.ref.ReferenceQueue ; 29 import java.io.Serializable ; 30 31 import org.ofbiz.base.util.Debug; 32 33 39 public class CacheSoftReference extends SoftReference implements Serializable { 40 41 public static final String module = CacheSoftReference.class.getName(); 42 43 public CacheSoftReference(Object o) { 44 super(o); 45 } 46 47 public CacheSoftReference(Object o, ReferenceQueue referenceQueue) { 48 super(o, referenceQueue); 49 } 50 51 public void clear() { 52 if (Debug.verboseOn()) { 53 Debug.logVerbose(new Exception ("UtilCache.CacheSoftRef.clear()"), "Clearing UtilCache SoftReference - " + get(), module); 54 } 55 super.clear(); 56 } 57 58 public void finalize() throws Throwable { 59 if (Debug.verboseOn()) { 60 Debug.logVerbose(new Exception ("UtilCache.CacheSoftRef.finalize()"), "Finalize UtilCache SoftReference - " + get(), module); 61 } 62 super.finalize(); 63 } 64 } 65 | Popular Tags |