use of com.hazelcast.map.impl.querycache.subscriber.SubscriberRegistry in project hazelcast by hazelcast.
the class ClientQueryCacheContext method recreateAllCaches.
public void recreateAllCaches() {
// Since query cache is lost we are firing event lost event for each cache and for each partition
QueryCacheFactory queryCacheFactory = subscriberContext.getQueryCacheFactory();
Map<String, SubscriberRegistry> registryMap = subscriberContext.getMapSubscriberRegistry().getAll();
for (SubscriberRegistry subscriberRegistry : registryMap.values()) {
Map<String, Accumulator> accumulatorMap = subscriberRegistry.getAll();
for (Accumulator accumulator : accumulatorMap.values()) {
AccumulatorInfo info = accumulator.getInfo();
String cacheId = info.getCacheId();
InternalQueryCache queryCache = queryCacheFactory.getOrNull(cacheId);
if (queryCache != null) {
queryCache.recreate();
}
}
}
}
Aggregations