summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/repo/map
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2010-08-18 16:54:59 +0000
committerBrian S. O'Neill <bronee@gmail.com>2010-08-18 16:54:59 +0000
commitc270234f37f0d9bdb1755f22561cbcba156b6e8c (patch)
tree1c1d2b14e7b9d383945c050425575802ab7aa782 /src/main/java/com/amazon/carbonado/repo/map
parent41baed7d94d0cef87d77bd9dbdac78940a71180a (diff)
Introduce SoftValuedCache, which evicts more aggressively than SoftValuedHashMap.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/repo/map')
-rw-r--r--src/main/java/com/amazon/carbonado/repo/map/Key.java7
1 files changed, 4 insertions, 3 deletions
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<S extends Storable> implements Comparable<Key<S>> {
void setKeyValues(S storable, Object[] identityValues, Object rangeValue);
}
- private static final Map<Class, Assigner> mAssigners;
+ private static final SoftValuedCache<Class, Assigner> mAssigners;
static {
- mAssigners = new SoftValuedHashMap();
+ mAssigners = SoftValuedCache.newCache(11);
}
public static synchronized <S extends Storable> Assigner<S> getAssigner(Class<S> clazz) {