/** * Notifies expiration listeners that the given entry expired. Must not be called from within a locked context. * * @param entry Entry to expire */ void notifyListeners(final ExpiringEntry<K, V> entry) { if (asyncExpirationListeners != null) for (final ExpirationListener<K, V> listener : asyncExpirationListeners) { LISTENER_SERVICE.execute(new Runnable() { public void run() { try { listener.expired(entry.key, entry.getValue()); } catch (Exception ignoreUserExceptions) { } } }); } if (expirationListeners != null) for (final ExpirationListener<K, V> listener : expirationListeners) { try { listener.expired(entry.key, entry.getValue()); } catch (Exception ignoreUserExceptions) { } } }
/** * Notifies expiration listeners that the given entry expired. Must not be called from within a locked context. * * @param entry Entry to expire */ void notifyListeners(final ExpiringEntry<K, V> entry) { if (asyncExpirationListeners != null) for (final ExpirationListener<K, V> listener : asyncExpirationListeners) { LISTENER_SERVICE.execute(new Runnable() { public void run() { try { listener.expired(entry.key, entry.getValue()); } catch (Exception ignoreUserExceptions) { } } }); } if (expirationListeners != null) for (final ExpirationListener<K, V> listener : expirationListeners) { try { listener.expired(entry.key, entry.getValue()); } catch (Exception ignoreUserExceptions) { } } }
/** * Notifies expiration listeners that the given entry expired. Must not be called from within a locked context. * * @param entry Entry to expire */ void notifyListeners(final ExpiringEntry<K, V> entry) { if (asyncExpirationListeners != null) for (final ExpirationListener<K, V> listener : asyncExpirationListeners) { LISTENER_SERVICE.execute(new Runnable() { public void run() { try { listener.expired(entry.key, entry.getValue()); } catch (Exception ignoreUserExceptions) { } } }); } if (expirationListeners != null) for (final ExpirationListener<K, V> listener : expirationListeners) { try { listener.expired(entry.key, entry.getValue()); } catch (Exception ignoreUserExceptions) { } } }