@CacheEntryRemoved public void removed(CacheEntryRemovedEvent<Address, Map.Entry<K, V>> event) { if (event.isOriginLocal() || event.isPre()) return; if (!this.listeners.isEmpty()) { Map.Entry<K, V> entry = event.getOldValue(); // WFLY-4938 For some reason, the old value can be null if (entry != null) { this.notifyListeners(event.getType(), entry); } } }
@CacheEntryRemoved public void removed(CacheEntryRemovedEvent<SessionCreationMetaDataKey, ?> event) { if (event.isPre()) { String id = event.getKey().getValue(); InfinispanWebLogger.ROOT_LOGGER.tracef("Session %s will be removed", id); Map.Entry<MV, AV> value = this.factory.findValue(id); if (value != null) { ImmutableSession session = this.factory.createImmutableSession(id, value); ImmutableSessionAttributes attributes = session.getAttributes(); HttpSession httpSession = new ImmutableHttpSessionAdapter(session, this.context); for (String name: attributes.getAttributeNames()) { Object attribute = attributes.getAttribute(name); if (attribute instanceof HttpSessionBindingListener) { HttpSessionBindingListener listener = (HttpSessionBindingListener) attribute; listener.valueUnbound(new HttpSessionBindingEvent(httpSession, name, attribute)); } } if (this.recorder != null) { this.recorder.record(session); } } } }
/** * Any removed cache entry will trigger this event, its function is only notify by printing information on the logs about * which entry was removed from {@link KarmaCache} * @param event {@link CacheEntryRemovedEvent} */ @CacheEntryRemoved public void entryRemoved(CacheEntryRemovedEvent event) { log.info("entry " + event.getKey() + " removed from the cache"); }
@CacheEntryRemoved public void removed(CacheEntryEvent<String, Integer> event) { removalCount.incrementAndGet(); } }
@CacheEntryRemoved public void removed(CacheEntryRemovedEvent<String, String> event) { events.add(event); } }
@CacheEntryVisited @CacheEntryRemoved public void callback(Event e) { } }
@CacheEntryVisited @CacheEntryRemoved public void callback(CacheEntryRemovedEvent e) { } }
@CacheEntryRemoved @CacheEntryVisited public void callback(Event nme) { } }
@CacheEntryRemoved public void removed(CacheEntryRemovedEvent<String, Object> event) { if (event.isPre()) { Object object = event.getValue(); if (object != null) { remove(object); } } }
@CacheEntryRemoved public void removed(CacheEntryRemovedEvent<String, Map<Object, Object>> event) { if (event.isPre() || event.isOriginLocal()) return; try { this.manager.notifyRemoteInvalidation(event.getKey()); } catch (Throwable e) { ROOT_LOGGER.warn(e.getLocalizedMessage(), e); } }
@CacheEntryRemoved public void observeRemove(CacheEntryRemovedEvent<Object, Object> event) { if (event.isPre()) { return; } if (this.toBeUpdated != null) { this.toBeUpdated.entryDeleted(event.getKey(), this.containerName, this.cacheName, event.isOriginLocal()); } } }
@CacheEntryCreated @CacheEntryModified @CacheEntryRemoved public void onCacheNotification(CacheEntryEvent<K, V> event) { log.tracef("Received event: %s", event); events.add(event); } }
@CacheEntryCreated @CacheEntryModified @CacheEntryRemoved public void onCacheEvent(CacheEntryEvent event) { log.debugf("Adding new cluster event %s", event); events.add(event); } }
@CacheEntryCreated @CacheEntryModified @CacheEntryRemoved public synchronized void onCacheNotification(CacheEntryEvent<K, V> event) { log.tracef("Received event: %s", event); events.add(event); } }
@CacheEntryCreated @CacheEntryModified @CacheEntryRemoved public void onCacheEvent(CacheEntryEvent event) { log.debugf("Adding new cluster event %s", event); events.add(event); } }
@CacheEntryModified @CacheEntryRemoved @CacheEntryVisited @CacheEntryCreated public void catchEvent(Event e) { if (e.isPre()) counter.getAndIncrement(); } }
@CacheEntryVisited @CacheEntryActivated @CacheEntryModified @CacheEntryRemoved @CacheEntryCreated @CacheEntryInvalidated @CacheEntryPassivated public void listenEvent(CacheEntryEvent event) { events.add(event); } }
@CacheEntryVisited @CacheEntryActivated @CacheEntryModified @CacheEntryRemoved @CacheEntryCreated @CacheEntryInvalidated @CacheEntryPassivated public void listenEvent(CacheEntryEvent event) { events.add(event); } }
@CacheEntryVisited @CacheEntryActivated @CacheEntryModified @CacheEntryRemoved @CacheEntryCreated @CacheEntryInvalidated @CacheEntryPassivated public void listenEvent(CacheEntryEvent event) { events.add(event); } }
@CacheEntryRemoved @CacheEntryModified public void callback(TransactionalEvent e) { log.trace("Callback got event " + e); log.debug("Callback got event " + e); assertFalse("entry was removed on remote cache so isLocal should be false", e.isOriginLocal()); } }