170171172173174175176177
log.info("Using existing EHCache named [" + cache.getName() + "]"); } } return new EhCache<K, V>(cache); } catch (net.sf.ehcache.CacheException e) { throw new CacheException(e); } }
219220221222223224225226
log.debug("implicit cacheManager created successfully."); } } return this.manager; } catch (Exception e) { throw new CacheException(e); } }
169170171172173174175176
218219220221222223224225
8283848586878889
//noinspection unchecked return (V) element.getObjectValue(); } } } catch (Throwable t) { throw new CacheException(t); } }
102103104105106107108109
V previous = get(key); Element element = new Element(key, value); cache.put(element); return previous; } catch (Throwable t) { throw new CacheException(t); } }
122123124125126127128129
try { V previous = get(key); cache.remove(key); return previous; } catch (Throwable t) { throw new CacheException(t); } }
136137138139140141142143
log.trace("Clearing all objects from cache [" + cache.getName() + "]"); } try { cache.removeAll(); } catch (Throwable t) { throw new CacheException(t); } }
144145146147148149150151
public int size() { try { return cache.getSize(); } catch (Throwable t) { throw new CacheException(t); } }
158159160161162163164165
return Collections.unmodifiableSet(new LinkedHashSet<K>(keys)); } else { return Collections.emptySet(); } } catch (Throwable t) { throw new CacheException(t); } }