| A bi-level cache based on HashMap for caching objects with minimal sychronization
overhead. The limitation is that remove() is very expensive.
Access to L1 map is not sychronized, to L2 map is synchronized. New values
are first stored in L2. Once there have been more that a specified mumber of
misses on L1, L1 and L2 maps are merged and the new map assigned to L1
and L2 cleared.
IMPORTANT:entrySet(), keySet(), and values() return unmodifiable snapshot collections.
author: Anton Koinov (latest modification by $Author: manolito $) version: $Revision: 380686 $ $Date: 2006-02-24 16:19:28 +0100 (Fr, 24 Feb 2006) $ |