Search in sources :

Example 1 with NodeInvokerWrapper

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);
    }
}
Also used : Address(com.hazelcast.nio.Address) NodeInvokerWrapper(com.hazelcast.map.impl.querycache.NodeInvokerWrapper) InvokerWrapper(com.hazelcast.map.impl.querycache.InvokerWrapper) NodeInvokerWrapper(com.hazelcast.map.impl.querycache.NodeInvokerWrapper) Member(com.hazelcast.core.Member)

Aggregations

Member (com.hazelcast.core.Member)1 InvokerWrapper (com.hazelcast.map.impl.querycache.InvokerWrapper)1 NodeInvokerWrapper (com.hazelcast.map.impl.querycache.NodeInvokerWrapper)1 Address (com.hazelcast.nio.Address)1