svn commit: r929827 - in /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache: CacheLine.java HardRefCacheLine.java SoftRefCacheLine.java UtilCache.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r929827 - in /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache: CacheLine.java HardRefCacheLine.java SoftRefCacheLine.java UtilCache.java

doogie-3
Author: doogie
Date: Thu Apr  1 04:39:35 2010
New Revision: 929827

URL: http://svn.apache.org/viewvc?rev=929827&view=rev
Log:
Remove CacheLine constructor variants that don't take a loadTime.

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/CacheLine.java
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/HardRefCacheLine.java
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/SoftRefCacheLine.java
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/CacheLine.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/CacheLine.java?rev=929827&r1=929826&r2=929827&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/CacheLine.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/CacheLine.java Thu Apr  1 04:39:35 2010
@@ -26,10 +26,6 @@ public abstract class CacheLine<V> imple
     public long loadTime;
     public final long expireTime;
 
-    protected CacheLine(long expireTime) {
-        this(0, expireTime);
-    }
-
     protected CacheLine(long loadTime, long expireTime) {
         this.expireTime = expireTime;
         this.loadTime = loadTime;

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/HardRefCacheLine.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/HardRefCacheLine.java?rev=929827&r1=929826&r2=929827&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/HardRefCacheLine.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/HardRefCacheLine.java Thu Apr  1 04:39:35 2010
@@ -22,11 +22,6 @@ package org.ofbiz.base.util.cache;
 public final class HardRefCacheLine<V> extends CacheLine<V> {
     public final V value;
 
-    public HardRefCacheLine(V value, long expireTime) {
-        super(expireTime);
-        this.value = value;
-    }
-
     public HardRefCacheLine(V value, long loadTime, long expireTime) {
         super(loadTime, expireTime);
         this.value = value;

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/SoftRefCacheLine.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/SoftRefCacheLine.java?rev=929827&r1=929826&r2=929827&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/SoftRefCacheLine.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/SoftRefCacheLine.java Thu Apr  1 04:39:35 2010
@@ -22,11 +22,6 @@ package org.ofbiz.base.util.cache;
 public final class SoftRefCacheLine<V> extends CacheLine<V> {
     public final CacheSoftReference<V> ref;
 
-    public SoftRefCacheLine(V value, long expireTime) {
-        super(expireTime);
-        this.ref = new CacheSoftReference<V>(value);
-    }
-
     public SoftRefCacheLine(V value, long loadTime, long expireTime) {
         super(loadTime, expireTime);
         this.ref = new CacheSoftReference<V>(value);

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java?rev=929827&r1=929826&r2=929827&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java Thu Apr  1 04:39:35 2010
@@ -242,7 +242,7 @@ public class UtilCache<K, V> implements
         if (expireTime > 0) {
             newCacheLine = useSoftReference ? new SoftRefCacheLine<V>(value, System.currentTimeMillis(), expireTime) : new HardRefCacheLine<V>(value, System.currentTimeMillis(), expireTime);
         } else {
-            newCacheLine = useSoftReference ? new SoftRefCacheLine<V>(value, expireTime) : new HardRefCacheLine<V>(value, expireTime);
+            newCacheLine = useSoftReference ? new SoftRefCacheLine<V>(value, 0, expireTime) : new HardRefCacheLine<V>(value, 0, expireTime);
         }
         oldCacheLine = cacheLineTable.put(key, newCacheLine);