@CacheEntriesEvicted public void evicted(CacheEntriesEvictedEvent<Key<String>, ?> event) { if (!event.isPre()) { Cache<SessionAccessMetaDataKey, SessionAccessMetaData> cache = this.accessMetaDataCache.getAdvancedCache().withFlags(Flag.SKIP_LISTENER_NOTIFICATION); for (Key<String> key : event.getEntries().keySet()) { // Workaround for ISPN-8324 if (key instanceof SessionCreationMetaDataKey) { cache.evict(new SessionAccessMetaDataKey(key.getValue())); } } } } }
@CacheEntriesEvicted public void evicted(CacheEntriesEvictedEvent<Key<String>, ?> event) { if (!event.isPre()) { Cache<SessionAttributesKey, V> cache = this.cache.getAdvancedCache().withFlags(Flag.SKIP_LISTENER_NOTIFICATION); for (Key<String> key : event.getEntries().keySet()) { // Workaround for ISPN-8324 if (key instanceof SessionCreationMetaDataKey) { cache.evict(new SessionAttributesKey(key.getValue())); } } } } }
@CacheEntriesEvicted public void evicted(CacheEntriesEvictedEvent<Key<String>, ?> event) { if (!event.isPre()) { Set<SessionAttributeNamesKey> keys = new HashSet<>(); for (Key<String> key : event.getEntries().keySet()) { // Workaround for ISPN-8324 if (key instanceof SessionCreationMetaDataKey) { keys.add(new SessionAttributeNamesKey(key.getValue())); } } if (!keys.isEmpty()) { Cache<SessionAttributeKey, V> cache = this.attributeCache.getAdvancedCache().withFlags(Flag.SKIP_LISTENER_NOTIFICATION); for (Map.Entry<SessionAttributeNamesKey, Map<String, UUID>> entry : this.namesCache.getAdvancedCache().withFlags(Flag.CACHE_MODE_LOCAL, Flag.SKIP_CACHE_LOAD, Flag.ZERO_LOCK_ACQUISITION_TIMEOUT, Flag.FAIL_SILENTLY).getAll(keys).entrySet()) { Map<String, UUID> names = entry.getValue(); if (names != null) { String sessionId = entry.getKey().getValue(); for (UUID attributeId : names.values()) { cache.evict(new SessionAttributeKey(sessionId, attributeId)); } } this.namesCache.getAdvancedCache().withFlags(Flag.SKIP_LISTENER_NOTIFICATION).evict(entry.getKey()); } } } } }
@org.infinispan.notifications.cachelistener.annotation.CacheEntriesEvicted public void handle(CacheEntriesEvictedEvent e) { handler.handle(e); } }
@CacheEntriesEvicted public void userEvicted(CacheEntriesEvictedEvent<String, Object> event) { for (Object object : event.getEntries().values()) { remove(object); } }
@Override @CacheEntriesEvicted public void fire(CacheEntriesEvictedEvent<K, V> payload) { super.fire(new CDICacheEntriesEvictedEvent(payload)); } }
@Override @CacheEntriesEvicted public void fire(CacheEntriesEvictedEvent<K, V> payload) { super.fire(new CDICacheEntriesEvictedEvent(payload)); } }
@CacheEntriesEvicted public void dataEvicted(CacheEntriesEvictedEvent event) { if (log.isTraceEnabled()) { if (event.isPre()) { log.trace("Going to evict " + event.getEntries().size() + " entries from the cache " + event.getCache().getName()); } else { log.trace("Evicted " + event.getEntries().size() + " entries from the cache " + event.getCache().getName()); } } }
@CacheEntryModified @CacheEntryRemoved @CacheEntriesEvicted public void removed(Event<?, ?> e) { if (!e.isPre()) updateCachedDataTable(); } }
@CacheEntriesEvicted @Override public void evicted(CacheEntriesEvictedEvent event) { if (event.getEntries().containsKey(key1)) { writeLatch.blockIfNeeded(); } } };
@CacheEntriesEvicted @Override public void evicted(CacheEntriesEvictedEvent event) { if (event.getEntries().containsKey(key1)) { writeLatch.blockIfNeeded(); } } };
@CacheEntriesEvicted @Override public void evicted(CacheEntriesEvictedEvent event) { if (event.getEntries().containsKey(key1)) { latch.blockIfNeeded(); } } };
@CacheEntriesEvicted @Override public void evicted(CacheEntriesEvictedEvent event) { if (event.getEntries().containsKey(key1)) { writeLatch.blockIfNeeded(); } } };
@CacheEntriesEvicted @Override public void evicted(CacheEntriesEvictedEvent event) { if (event.getEntries().containsKey(key1)) { writeLatch.blockIfNeeded(); } } };
@CacheEntriesEvicted @SuppressWarnings("unused") public void entryEvicted(Event e) { log.info("Cache entries evicted, 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); } }
@CacheEntriesEvicted @SuppressWarnings("unused") public void entryEvicted(Event e) { log.info("Cache entry evicted, 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); }
@CacheEntriesEvicted @Override public void evicted(CacheEntriesEvictedEvent event) { if (event.getEntries().containsKey(key1)) { latch.blockIfNeeded(); } } };
@CacheEntriesEvicted @Override public void evicted(CacheEntriesEvictedEvent event) { if (event.getEntries().containsKey(key1)) { writeLatch.blockIfNeeded(); } } };
@CacheEntriesEvicted @Override public void evicted(CacheEntriesEvictedEvent event) { if (event.getEntries().containsKey(key1)) { writeLatch.blockIfNeeded(); } } };
@CacheEntriesEvicted public void nodeEvicted(CacheEntriesEvictedEvent e) { assert e.isPre() || !e.isPre(); Object key = e.getEntries().keySet().iterator().next(); assert key != null; assert e.getCache() != null; assert e.getType() == Event.Type.CACHE_ENTRY_EVICTED; e.getEntries().entrySet().stream().forEach(entry -> evictedEntries.add((Map.Entry) entry)); }