/** * Gets an element from the cache, without updating Element statistics. Cache statistics are * still updated. * * @param key a serializable value * @return the element, or null, if it does not exist. */ public Element getQuiet(Serializable key) throws RemoteException { return cache.getQuiet(key); }
/** * {@inheritDoc} */ public Element getQuiet(Serializable key) throws IllegalStateException, CacheException { return underlyingCache.getQuiet(key); }
/** * {@inheritDoc} */ public Element getQuiet(Object key) throws IllegalStateException, CacheException { return underlyingCache.getQuiet(key); }
/** * {@inheritDoc} */ public Element getQuiet(Serializable arg0) throws IllegalStateException, CacheException { // THIS IS GENERATED CODE -- DO NOT HAND MODIFY! Thread t = Thread.currentThread(); ClassLoader prev = t.getContextClassLoader(); t.setContextClassLoader(this.classLoader); try { return this.cache.getQuiet(arg0); } finally { t.setContextClassLoader(prev); } }
/** * {@inheritDoc} */ public Element getQuiet(Object arg0) throws IllegalStateException, CacheException { // THIS IS GENERATED CODE -- DO NOT HAND MODIFY! Thread t = Thread.currentThread(); ClassLoader prev = t.getContextClassLoader(); t.setContextClassLoader(this.classLoader); try { return this.cache.getQuiet(arg0); } finally { t.setContextClassLoader(prev); } }
/** * Gets a list of elements from the cache, for a list of keys, without updating Element statistics. Time to * idle lifetimes are therefore not affected. * <p> * Cache statistics are still updated. * <p> * Callers should ideally first call this method with a small list of keys to gauge the size of a typical Element. * Then a calculation can be made of the right number to request each time so as to optimise network performance and * not cause an OutOfMemory error on this Cache. * * @param keys a list of serializable values which represent keys * @return a list of Elements. If an element was not found or null, it will not be in the list. */ public List getElements(List keys) throws RemoteException { if (keys == null) { return new ArrayList(); } List elements = new ArrayList(); for (int i = 0; i < keys.size(); i++) { Serializable key = (Serializable) keys.get(i); Element element = cache.getQuiet(key); if (element != null) { elements.add(element); } } return elements; }
/** * Element can never be null. Add a null guard just in case. * @param key */ protected void update(final Object key) { try { Ehcache backingCache = getCache(); final Element element = backingCache.getQuiet(key); if (element == null) { if (LOG.isDebugEnabled()) { LOG.debug(getName() + ": entry with key " + key + " has been removed - skipping it"); } return; } refreshElement(element, backingCache); } catch (final Exception e) { // Collect the exception and keep going. // Throw the exception once all the entries have been refreshed // If the refresh fails, keep the old element. It will simply become staler. LOG.warn(getName() + "Could not refresh element " + key, e); } }
Element quickTest = underlyingCache.getQuiet(key); if (quickTest == null || checkForRefresh(quickTest, accessTime, refreshAheadConfig.getTimeToRefreshMillis())) { final Element ersatz = new Element(key, REFRESH_VALUE);
final Element element = backingCache.getQuiet(key);
try { Ehcache backingCache = getCache(); Element element = backingCache.getQuiet(key); if (element != null) { return refreshElement(element, backingCache, quiet);
/** * Gets an element from the cache, without updating Element statistics. Cache statistics are * still updated. * * @param key a serializable value * @return the element, or null, if it does not exist. */ public Element getQuiet(Serializable key) throws RemoteException { return cache.getQuiet(key); }
/** * Gets an element from the cache, without updating Element statistics. Cache statistics are * still updated. * * @param key a serializable value * @return the element, or null, if it does not exist. */ public Element getQuiet(Serializable key) throws RemoteException { return cache.getQuiet(key); }
/** * {@inheritDoc} */ public Element getQuiet(Object key) throws IllegalStateException, CacheException { return underlyingCache.getQuiet(key); }
/** * {@inheritDoc} */ public Element getQuiet(Object key) throws IllegalStateException, CacheException { return underlyingCache.getQuiet(key); }
/** * {@inheritDoc} */ public Element getQuiet(Serializable key) throws IllegalStateException, CacheException { return underlyingCache.getQuiet(key); }
/** * {@inheritDoc} */ public Element getQuiet(Serializable key) throws IllegalStateException, CacheException { return underlyingCache.getQuiet(key); }
/** * Gets an element from the cache, without updating Element statistics. Cache statistics are * still updated. * * @param key a serializable value * @return the element, or null, if it does not exist. */ public Element getQuiet(Serializable key) throws RemoteException { return cache.getQuiet(key); }
/** * {@inheritDoc} */ public Element getQuiet(Object key) throws IllegalStateException, CacheException { return underlyingCache.getQuiet(key); }
/** * {@inheritDoc} */ public Element getQuiet(Serializable key) throws IllegalStateException, CacheException { return underlyingCache.getQuiet(key); }
public Element getQuiet(Serializable key) throws IllegalStateException, CacheException { return self().getQuiet(key); }