*/
public CacheMap(boolean lru, int max, int size, float load) {
if (size < 0)
size = 500;
if (!lru) {
cacheMap = new ConcurrentHashMap(size, load) {
public void overflowRemoved(Object key, Object value) {
cacheMapOverflowRemoved(key, value);
}
};
softMap = new ConcurrentReferenceHashMap(ReferenceMap.HARD,
ReferenceMap.SOFT, size, load) {
public void overflowRemoved(Object key, Object value) {
softMapOverflowRemoved(key, value);
}
public void valueExpired(Object key) {
softMapValueExpired(key);
}
};
pinnedMap = new ConcurrentHashMap();
_readLock = null;
} else {
cacheMap = new LRUMap(size, load) {
public void overflowRemoved(Object key, Object value) {
cacheMapOverflowRemoved(key, value);