/** * Refresh a single element. * <p> * Refreshes bypass the {@link BlockingCache} and act directly on the backing {@link Ehcache}. * This way, {@link BlockingCache} gets can continue to return stale data while the refresh, which * might be expensive, takes place. * <p> * If the element is absent it is created * <p> * Quiet methods are used, so that statistics are not affected. * Note that the refreshed element will not be replicated to any cache peers. * * @param key * @return the refreshed Element * @throws CacheException * @since 1.6.1 */ public Element refresh(Object key) throws CacheException { return refresh(key, true); }
/** * Refresh the elements of this cache. * <p> * Refreshes bypass the {@link BlockingCache} and act directly on the backing {@link Ehcache}. * This way, {@link BlockingCache} gets can continue to return stale data while the refresh, which * might be expensive, takes place. * <p> * Quiet methods are used, so that statistics are not affected. * Note that the refreshed elements will not be replicated to any cache peers. * <p> * Configure ehcache.xml to stop elements from being refreshed forever: * <ul> * <li>use timeToIdle to discard elements unused for a period of time * <li>use timeToLive to discard elmeents that have existed beyond their allotted lifespan * </ul> * * @throws CacheException */ public void refresh() throws CacheException { refresh(true); }
/** * Refresh a single element. * <p> * Refreshes bypass the {@link BlockingCache} and act directly on the backing {@link Ehcache}. * This way, {@link BlockingCache} gets can continue to return stale data while the refresh, which * might be expensive, takes place. * <p> * If the element is absent it is created * <p> * Quiet methods are used, so that statistics are not affected. * Note that the refreshed element will not be replicated to any cache peers. * * @param key * @return the refreshed Element * @throws CacheException * @since 1.6.1 */ public Element refresh(Object key) throws CacheException { return refresh(key, true); }
/** * Refresh the elements of this cache. * <p/> * Refreshes bypass the {@link BlockingCache} and act directly on the backing {@link Ehcache}. * This way, {@link BlockingCache} gets can continue to return stale data while the refresh, which * might be expensive, takes place. * <p/> * Quiet methods are used, so that statistics are not affected. * Note that the refreshed elements will not be replicated to any cache peers. * <p/> * Configure ehcache.xml to stop elements from being refreshed forever: * <ul> * <li>use timeToIdle to discard elements unused for a period of time * <li>use timeToLive to discard elmeents that have existed beyond their allotted lifespan * </ul> * * @throws CacheException */ public void refresh() throws CacheException { refresh(true); }
/** * Refresh the elements of this cache. * <p> * Refreshes bypass the {@link BlockingCache} and act directly on the backing {@link Ehcache}. * This way, {@link BlockingCache} gets can continue to return stale data while the refresh, which * might be expensive, takes place. * <p> * Quiet methods are used, so that statistics are not affected. * Note that the refreshed elements will not be replicated to any cache peers. * <p> * Configure ehcache.xml to stop elements from being refreshed forever: * <ul> * <li>use timeToIdle to discard elements unused for a period of time * <li>use timeToLive to discard elmeents that have existed beyond their allotted lifespan * </ul> * * @throws CacheException */ public void refresh() throws CacheException { refresh(true); }
/** * Refresh a single element. * <p/> * Refreshes bypass the {@link BlockingCache} and act directly on the backing {@link Ehcache}. * This way, {@link BlockingCache} gets can continue to return stale data while the refresh, which * might be expensive, takes place. * <p/> * If the element is absent it is created * <p/> * Quiet methods are used, so that statistics are not affected. * Note that the refreshed element will not be replicated to any cache peers. * * @param key * @return the refreshed Element * @throws CacheException * @since 1.6.1 */ public Element refresh(Object key) throws CacheException { return refresh(key, true); }
/** * Refresh a single element. * <p/> * Refreshes bypass the {@link BlockingCache} and act directly on the backing {@link Ehcache}. * This way, {@link BlockingCache} gets can continue to return stale data while the refresh, which * might be expensive, takes place. * <p/> * If the element is absent it is created * <p/> * Quiet methods are used, so that statistics are not affected. * Note that the refreshed element will not be replicated to any cache peers. * * @param key * @return the refreshed Element * @throws CacheException * @since 1.6.1 */ public Element refresh(Object key) throws CacheException { return refresh(key, true); }
/** * Refresh the elements of this cache. * <p/> * Refreshes bypass the {@link BlockingCache} and act directly on the backing {@link Ehcache}. * This way, {@link BlockingCache} gets can continue to return stale data while the refresh, which * might be expensive, takes place. * <p/> * Quiet methods are used, so that statistics are not affected. * Note that the refreshed elements will not be replicated to any cache peers. * <p/> * Configure ehcache.xml to stop elements from being refreshed forever: * <ul> * <li>use timeToIdle to discard elements unused for a period of time * <li>use timeToLive to discard elmeents that have existed beyond their allotted lifespan * </ul> * * @throws CacheException */ public void refresh() throws CacheException { refresh(true); }