if (newSize < max) {
shrink(newSize);
} else {
LOG.debug("Growing collection cache to " + newSize);
SequencedLongHashMap<Cacheable> newMap = new SequencedLongHashMap<Cacheable>(newSize * 2);
Object2LongHashMap newNames = new Object2LongHashMap(newSize);
SequencedLongHashMap.Entry<Cacheable> next = map.getFirstEntry();
Cacheable cacheable;
while(next != null) {
cacheable = next.getValue();
newMap.put(cacheable.getKey(), cacheable);
newNames.put(((Collection) cacheable).getURI().getRawCollectionPath(), cacheable.getKey());
next = next.getNext();
}
max = newSize;
map = newMap;
names = newNames;