@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 } } } } }
@CacheEntryCreated @SuppressWarnings("unused") public void create(CacheEntryEvent e) { created = true; }
@CacheEntryCreated public void handleEvent(CacheEntryEvent<Object, Object> e) { } }
@CacheEntryCreated public void created(CacheEntryEvent event) { } }
@CacheEntryCreated public void handle(CacheEntryCreatedEvent e) { if (e.isPre()) { caller = Thread.currentThread(); latch.countDown(); } } }
@CacheEntryCreated public void handle(CacheEntryCreatedEvent e) { if (e.isPre()) { caller = Thread.currentThread(); latch.countDown(); } } }
@CacheEntryCreated public void entryCreated(CacheEntryCreatedEvent cec) { if (cec.isPre()) log.add(TxEvent.CREATED); }
@CacheEntryCreated @SuppressWarnings("unused") public void entryCreated(CacheEntryEvent event) throws Exception { if (failureLocation == FailureLocation.ON_CREATE) injectFailure(event); }
@CacheEntryCreated @SuppressWarnings("unused") public void entryCreated(CacheEntryEvent event) throws Exception { if (failureLocation == FailureLocation.ON_CREATE) injectFailure(event); }
@CacheEntryCreated @SuppressWarnings("unused") public void entryCreated(CacheEntryEvent event) throws Exception { caller = Thread.currentThread(); if (failureLocation == FailureLocation.ON_CREATE) injectFailure(event); }
@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 @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"); } } }
@CacheEntryModified @CacheEntryRemoved @CacheEntryVisited @CacheEntryCreated public void catchEvent(Event e) { if (e.isPre()) counter.getAndIncrement(); } }
@SuppressWarnings("unused") @CacheEntryCreated public void handleCreated(CacheEntryCreatedEvent e) { if (!e.isPre()) { log.tracef("Created %s", e.getKey()); created.put(e.getKey(), e.getValue()); createdCounter++; } }
@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); } }
@CacheEntryCreated @CacheEntryModified @CacheEntryRemoved @CacheEntryExpired public void processEvent(CacheEntryEvent<Object, Object> event) { if (isAccepted(event.getType().toString())) { infinispanConsumer.processEvent(event.getType().toString(), IS_PRE, event.getCache().getName(), event.getKey()); } } }