public Measurable getFromCache(Measurable key) throws CacheException {
synchronized (algorithm) {
if (!algorithm.containsKey(key)) {
try {
Measurable value = (Measurable) listener.retrieve(key);
return algorithm.put(key, value);
} catch (CachePersistenceException e) {
throw new CacheException("retrieve value from underlying storage error", e);
} catch (SizeTooLargeException e) {
throw new CacheException("in-memory cache is NOT able to hold specified key/value pair.", e);