@org.infinispan.notifications.cachelistener.annotation.CacheEntryInvalidated public void handle(CacheEntryInvalidatedEvent e) { handler.handle(e); } }
@Override @CacheEntryInvalidated public void fire(CacheEntryInvalidatedEvent<K, V> payload) { super.fire(new CDICacheEntryInvalidatedEvent(payload)); } }
@Override @CacheEntryInvalidated public void fire(CacheEntryInvalidatedEvent<K, V> payload) { super.fire(new CDICacheEntryInvalidatedEvent(payload)); } }
@CacheEntryInvalidated public void removed(CacheEntryInvalidatedEvent<String, Object> event) { if (event.isPre()) { Object object = event.getValue(); if (object != null) { remove(object); } } }
@CacheEntryInvalidated public void userInvalidated(CacheEntryInvalidatedEvent<String, CachedUser> event) { if (event.isPre()) { CachedUser user = event.getValue(); if (user != null) { removeUser(user); log.tracev("User invalidated realm={0}, id={1}, username={2}", user.getRealm(), user.getId(), user.getUsername()); } } }
@CacheEntryActivated @CacheEntryCreated @CacheEntryInvalidated @CacheEntryLoaded @CacheEntryModified @CacheEntryPassivated @CacheEntryRemoved @CacheEntryVisited public void event(Event event) throws Throwable { ClassLoader cl = Thread.currentThread().getContextClassLoader(); String notFoundPackage = "org.infinispan.test.hibernate.cache.functional.entities"; String[] notFoundClasses = { notFoundPackage + ".Account", notFoundPackage + ".AccountHolder" }; SelectedClassnameClassLoader visible = new SelectedClassnameClassLoader(null, null, notFoundClasses, cl); Thread.currentThread().setContextClassLoader(visible); super.event(event); Thread.currentThread().setContextClassLoader(cl); } }
@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); } }
@CacheEntryActivated @CacheEntryCreated @CacheEntryInvalidated @CacheEntryLoaded @CacheEntryModified @CacheEntryPassivated @CacheEntryRemoved @CacheEntryVisited public void event(Event event) throws Throwable { List<Method> methods = this.methods.get(event.getType()); if (methods != null) { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); ClassLoader visible = (ClassLoader) cache.classLoaderRef.get(); cache.setContextClassLoader(visible); try { for (Method method : this.methods.get(event.getType())) { try { method.invoke(this.listener, event); } catch (InvocationTargetException e) { throw e.getCause(); } } } finally { cache.setContextClassLoader(classLoader); } } }
@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()); }
@CacheEntryActivated @CacheEntryCreated @CacheEntriesEvicted @CacheEntryInvalidated @CacheEntryLoaded @CacheEntryModified @CacheEntryPassivated @CacheEntryRemoved @CacheEntryVisited @TransactionCompleted @TransactionRegistered public void handle(Event e) { events.add(e); if (e.isPre()) receivedPre = true; else receivedPost = true; invocationCount++; } }
@CacheEntryActivated @CacheEntryCreated @CacheEntriesEvicted @CacheEntryInvalidated @CacheEntryLoaded @CacheEntryModified @CacheEntryPassivated @CacheEntryRemoved @CacheEntryVisited @TransactionCompleted @TransactionRegistered @CacheEntryExpired public void handle(Event e) { events.add(e); if (e.isPre()) receivedPre = true; else receivedPost = true; invocationCount++; } }
@CacheEntryActivated @CacheEntryCreated @CacheEntriesEvicted @CacheEntryInvalidated @CacheEntryLoaded @CacheEntryModified @CacheEntryPassivated @CacheEntryRemoved @CacheEntryVisited @TransactionCompleted @TransactionRegistered public void handle(Event e) { try { Object value = e.getCache().getAdvancedCache().withFlags(Flag.SKIP_LISTENER_NOTIFICATION).get("key"); log.debugf("Event=%s, value=%s", e, value); } catch (Throwable throwable) { list.add(throwable); } }