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/spi/LobEngine.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/amazon/carbonado/spi') 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 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); -- cgit v1.2.3