use of com.hazelcast.map.impl.querycache.NodeInvokerWrapper in project hazelcast by hazelcast.
the class DefaultQueryCache method destroyRemoteResources.
private void destroyRemoteResources() {
SubscriberContext subscriberContext = context.getSubscriberContext();
SubscriberContextSupport subscriberContextSupport = subscriberContext.getSubscriberContextSupport();
InvokerWrapper invokerWrapper = context.getInvokerWrapper();
if (invokerWrapper instanceof NodeInvokerWrapper) {
Collection<Member> memberList = context.getMemberList();
for (Member member : memberList) {
Address address = member.getAddress();
Object removePublisher = subscriberContextSupport.createDestroyQueryCacheOperation(mapName, userGivenCacheName);
invokerWrapper.invokeOnTarget(removePublisher, address);
}
} else {
Object removePublisher = subscriberContextSupport.createDestroyQueryCacheOperation(mapName, userGivenCacheName);
invokerWrapper.invoke(removePublisher);
}
}
Aggregations