/** * 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 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 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 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); } }