summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/spi
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/spi
parent41baed7d94d0cef87d77bd9dbdac78940a71180a (diff)
Introduce SoftValuedCache, which evicts more aggressively than SoftValuedHashMap.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/spi')
-rw-r--r--src/main/java/com/amazon/carbonado/spi/LobEngine.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/com/amazon/carbonado/spi/LobEngine.java b/src/main/java/com/amazon/carbonado/spi/LobEngine.java
index 143bd26..0262890 100644
--- a/src/main/java/com/amazon/carbonado/spi/LobEngine.java
+++ b/src/main/java/com/amazon/carbonado/spi/LobEngine.java
@@ -30,7 +30,6 @@ import java.util.Map;
import java.util.List;
import org.cojen.util.KeyFactory;
-import org.cojen.util.SoftValuedHashMap;
import com.amazon.carbonado.Cursor;
import com.amazon.carbonado.FetchException;
@@ -58,6 +57,8 @@ import com.amazon.carbonado.lob.Lob;
import com.amazon.carbonado.sequence.SequenceValueGenerator;
import com.amazon.carbonado.sequence.SequenceValueProducer;
+import com.amazon.carbonado.util.SoftValuedCache;
+
/**
* Complete Lob support for repositories, although repository is responsible
* for binding Lob properties to this engine. Lobs are referenced by locators,
@@ -88,7 +89,7 @@ public class LobEngine {
final Storage<StoredLob.Block> mLobBlockStorage;
final SequenceValueProducer mLocatorSequence;
- private Map mTriggers;
+ private SoftValuedCache mTriggers;
/**
* @param lobRepo storage for Lobs - should not be replicated
@@ -460,7 +461,7 @@ public class LobEngine {
}
if (mTriggers == null) {
- mTriggers = new SoftValuedHashMap();
+ mTriggers = SoftValuedCache.newCache(7);
}
mTriggers.put(key, trigger);