@CacheEntryCreated @CacheEntryModified public void event(CacheEntryEvent<Address, Map.Entry<K, V>> event) { if (event.isOriginLocal() || event.isPre()) return; if (!this.listeners.isEmpty()) { Map.Entry<K, V> entry = event.getValue(); if (entry != null) { this.notifyListeners(event.getType(), entry); } } }
@CacheEntryCreated @CacheEntryModified public void modified(CacheEntryEvent<T, Set<Address>> event) { if (event.isPre()) return; Map.Entry<Listener, ExecutorService> entry = this.listeners.get(event.getKey()); if (entry != null) { Listener listener = entry.getKey(); if (listener != null) { ExecutorService executor = entry.getValue(); Set<Node> members = new TreeSet<>(); for (Address address : event.getValue()) { members.add(this.group.createNode(address)); } try { executor.submit(() -> { try { listener.providersChanged(members); } catch (Throwable e) { ClusteringServerLogger.ROOT_LOGGER.serviceProviderRegistrationListenerFailed(e, this.cache.getCacheManager().getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName(), this.cache.getName(), members); } }); } catch (RejectedExecutionException e) { // Executor was shutdown } } } } }
@CacheEntryModified @SuppressWarnings("unused") public void modify(CacheEntryEvent e) { modified = true; }
@org.infinispan.notifications.cachelistener.annotation.CacheEntryModified public void handle(CacheEntryModifiedEvent e) { handler.handle(e); } }
@CacheEntryModified @SuppressWarnings("unused") public void entryModified(CacheEntryEvent event) throws Exception { if (failureLocation == FailureLocation.ON_MODIFIED) injectFailure(event); }
@CacheEntryModified @SuppressWarnings("unused") public void entryModified(CacheEntryEvent event) throws Exception { if (failureLocation == FailureLocation.ON_MODIFIED) injectFailure(event); }
@CacheEntryModified @SuppressWarnings("unused") public void entryModified(CacheEntryEvent event) throws Exception { caller = Thread.currentThread(); if (failureLocation == FailureLocation.ON_MODIFIED) injectFailure(event); }
@CacheEntryCreated @CacheEntryRemoved @CacheEntryModified public void addEvent(TransactionalEvent event) { if (event.getGlobalTransaction() != null) { map.get(event.getGlobalTransaction()).add(event); } else { processEvent(event); } }
@CacheEntryCreated @CacheEntryModified public void event(CacheEntryEvent<Address, Map.Entry<K, V>> event) { if (event.isOriginLocal() || event.isPre()) return; if (!this.listeners.isEmpty()) { Map.Entry<K, V> entry = event.getValue(); if (entry != null) { this.notifyListeners(event.getType(), entry); } } }
@CacheEntryCreated @CacheEntryModified @SuppressWarnings("unused") public void entryCreated(CacheEntryEvent e) { assertCacheContents(e); }
@CacheEntryModified public void observeModify(CacheEntryModifiedEvent<Object, Object> event) { if (event.isPre()) { return; } if (this.toBeUpdated != null) { this.toBeUpdated.entryUpdated(event.getKey(), event.getValue(), this.containerName, this.cacheName, event.isOriginLocal()); } }
@CacheEntryCreated @CacheEntryModified @SuppressWarnings("unused") public void entryModified(CacheEntryEvent event) { if (!event.isPre()) { log.debugf("Entry modified: %s, let's throw an exception!!", event); throw new RuntimeException("Testing exception handling"); } } }
@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); } }
@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()); } }
@CacheEntryActivated @CacheEntryCreated @CacheEntryInvalidated @CacheEntryLoaded @CacheEntryModified @CacheEntryPassivated @CacheEntryRemoved @CacheEntryVisited @CacheEntryExpired public void processEvent(CacheEntryEvent<Object, Object> event) { dispatch(event.getType().toString(), event.isPre(), event.getCache().getName(), event.getKey()); }