use of com.tangosol.util.MapListener in project Openfire by igniterealtime.
the class ClusterListener method simuateCacheInserts.
private void simuateCacheInserts(Cache<Object, Object> cache) {
MapListener mapListener = mapListeners.get(cache);
if (mapListener != null) {
if (cache instanceof CacheWrapper) {
Cache wrapped = ((CacheWrapper) cache).getWrappedCache();
if (wrapped instanceof ClusteredCache) {
ClusteredCache clusteredCache = (ClusteredCache) wrapped;
for (Map.Entry entry : cache.entrySet()) {
MapEvent event = new MapEvent(clusteredCache.map, MapEvent.ENTRY_INSERTED, entry.getKey(), null, entry.getValue());
mapListener.entryInserted(event);
}
}
}
}
}
Aggregations