Refine search
@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); } } }
@CacheEntryCreated @CacheEntryRemoved @CacheEntryModified public void addEvent(TransactionalEvent event) { if (event.getGlobalTransaction() != null) { map.get(event.getGlobalTransaction()).add(event); } else { processEvent(event); } }
@CacheEntryCreated @CacheEntryRemoved public void addEvent(TransactionalEvent event) { if (event.isOriginLocal()) { // Local events are processed by local HTTP session listener return; } if (event.isPre()) { // only handle post events return; } if (event.getGlobalTransaction() != null) { map.get(event.getGlobalTransaction().globalId()).add(event); } else { processEvent(event); } }
@CacheEntryModified @CacheEntryRemoved @CacheEntriesEvicted public void removed(Event<?, ?> e) { if (!e.isPre()) updateCachedDataTable(); } }
@CacheEntryCreated @CacheEntryModified @CacheEntryRemoved public void onCacheNotification(CacheEntryEvent<K, V> event) { log.tracef("Received event: %s", event); events.add(event); } }
@CacheEntryCreated @CacheEntryRemoved @SuppressWarnings("unused") public void entryTouched(Event e) { if (!e.isPre()) { log.info("Cache entry touched, now check in different thread"); after.countDown(); // Force a bit of delay in the listener so that lack of visibility // of changes in container can be appreciated more easily TestingUtil.sleepThread(1000); } else { before.countDown(); try { boolean signalled = afterContinue.await(30, TimeUnit.SECONDS); assertTrue("Timed out while waiting for post listener event to execute", signalled); } catch (InterruptedException e1) { Thread.currentThread().interrupt(); } } }
@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()); } }
@CacheEntryCreated @CacheEntryModified @CacheEntryRemoved public void onCacheEvent(CacheEntryEvent event) { log.debugf("Adding new cluster event %s", event); events.add(event); } }
@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); } } } }
@CacheEntryCreated @CacheEntryModified @CacheEntryRemoved public synchronized void onCacheNotification(CacheEntryEvent<K, V> event) { log.tracef("Received event: %s", event); events.add(event); } }
/** * 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"); }
@CacheEntryCreated @CacheEntryModified @CacheEntryRemoved public void onCacheEvent(CacheEntryEvent event) { log.debugf("Adding new cluster event %s", event); events.add(event); } }
@org.infinispan.notifications.cachelistener.annotation.CacheEntryRemoved public void handle(CacheEntryRemovedEvent e) { handler.handle(e); } }
@CacheEntryModified @CacheEntryRemoved @CacheEntryVisited @CacheEntryCreated public void catchEvent(Event e) { if (e.isPre()) counter.getAndIncrement(); } }
@CacheEntryRemoved public void callback2(Event e) { } }
@CacheEntryVisited @CacheEntryActivated @CacheEntryModified @CacheEntryRemoved @CacheEntryCreated @CacheEntryInvalidated @CacheEntryPassivated public void listenEvent(CacheEntryEvent event) { events.add(event); } }
@CacheEntryRemoved public void cancelled( CacheEntryRemovedEvent<ScheduleKey, Map> e ) { if ( e == null ) { logger.error( "[FATAL]The infinispan cache removed event for indy schedule manager is null.", new NullPointerException( "CacheEntryRemovedEvent is null" ) ); return; } logger.info( "Cache removed to cancel scheduling, Key is {}, Value is {}", e.getKey(), e.getValue() ); }
@CacheEntryVisited @CacheEntryActivated @CacheEntryModified @CacheEntryRemoved @CacheEntryCreated @CacheEntryInvalidated @CacheEntryPassivated public void listenEvent(CacheEntryEvent event) { events.add(event); } }
@CacheEntryRemoved public void removed(CacheEntryEvent<String, Integer> event) { removalCount.incrementAndGet(); } }
@CacheEntryVisited @CacheEntryActivated @CacheEntryModified @CacheEntryRemoved @CacheEntryCreated @CacheEntryInvalidated @CacheEntryPassivated public void listenEvent(CacheEntryEvent event) { events.add(event); } }