From c270234f37f0d9bdb1755f22561cbcba156b6e8c Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Wed, 18 Aug 2010 16:54:59 +0000 Subject: Introduce SoftValuedCache, which evicts more aggressively than SoftValuedHashMap. --- src/main/java/com/amazon/carbonado/repo/map/Key.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/amazon/carbonado/repo/map') diff --git a/src/main/java/com/amazon/carbonado/repo/map/Key.java b/src/main/java/com/amazon/carbonado/repo/map/Key.java index 9348516..86a0023 100644 --- a/src/main/java/com/amazon/carbonado/repo/map/Key.java +++ b/src/main/java/com/amazon/carbonado/repo/map/Key.java @@ -34,7 +34,6 @@ import org.cojen.classfile.Modifiers; import org.cojen.classfile.TypeDesc; import org.cojen.util.ClassInjector; -import org.cojen.util.SoftValuedHashMap; import com.amazon.carbonado.Storable; @@ -45,6 +44,8 @@ import com.amazon.carbonado.info.StorableProperty; import com.amazon.carbonado.gen.CodeBuilderUtil; +import com.amazon.carbonado.util.SoftValuedCache; + /** * * @@ -82,10 +83,10 @@ class Key implements Comparable> { void setKeyValues(S storable, Object[] identityValues, Object rangeValue); } - private static final Map mAssigners; + private static final SoftValuedCache mAssigners; static { - mAssigners = new SoftValuedHashMap(); + mAssigners = SoftValuedCache.newCache(11); } public static synchronized Assigner getAssigner(Class clazz) { -- cgit v1.2.3