use of com.hazelcast.instance.MemberImpl in project hazelcast by hazelcast.
the class QueueService method dispatchEvent.
@Override
public void dispatchEvent(QueueEvent event, ItemListener listener) {
final MemberImpl member = nodeEngine.getClusterService().getMember(event.caller);
ItemEvent itemEvent = new DataAwareItemEvent(event.name, event.eventType, event.data, member, nodeEngine.getSerializationService());
if (member == null) {
if (logger.isInfoEnabled()) {
logger.info("Dropping event " + itemEvent + " from unknown address:" + event.caller);
}
return;
}
if (event.eventType.equals(ItemEventType.ADDED)) {
listener.itemAdded(itemEvent);
} else {
listener.itemRemoved(itemEvent);
}
getLocalQueueStatsImpl(event.name).incrementReceivedEvents();
}
use of com.hazelcast.instance.MemberImpl in project hazelcast by hazelcast.
the class MapDestroyCacheMessageTask method call.
@Override
protected Object call() throws Exception {
ClusterService clusterService = clientEngine.getClusterService();
Collection<MemberImpl> members = clusterService.getMemberImpls();
List<Future<Boolean>> futures = new ArrayList<Future<Boolean>>(members.size());
createInvocations(members, futures);
Collection<Boolean> results = FutureUtil.returnWithDeadline(futures, 1, TimeUnit.MINUTES);
return reduce(results);
}
use of com.hazelcast.instance.MemberImpl in project hazelcast by hazelcast.
the class MapPublisherCreateMessageTask method call.
@Override
protected Object call() throws Exception {
ClusterService clusterService = clientEngine.getClusterService();
Collection<MemberImpl> members = clusterService.getMemberImpls();
List<Future> futures = new ArrayList<Future>(members.size());
createInvocations(members, futures);
return getQueryResults(futures);
}
use of com.hazelcast.instance.MemberImpl in project hazelcast by hazelcast.
the class MapPublisherCreateWithValueMessageTask method call.
@Override
protected Object call() throws Exception {
ClusterService clusterService = clientEngine.getClusterService();
Collection<MemberImpl> members = clusterService.getMemberImpls();
List<Future> futures = new ArrayList<Future>(members.size());
createInvocations(members, futures);
return getQueryResults(futures);
}
use of com.hazelcast.instance.MemberImpl in project hazelcast by hazelcast.
the class CollectionService method dispatchEvent.
@Override
public void dispatchEvent(CollectionEvent event, ItemListener listener) {
final MemberImpl member = nodeEngine.getClusterService().getMember(event.getCaller());
ItemEvent itemEvent = new DataAwareItemEvent(event.getName(), event.getEventType(), event.getData(), member, nodeEngine.getSerializationService());
if (member == null) {
if (logger.isInfoEnabled()) {
logger.info("Dropping event " + itemEvent + " from unknown address:" + event.getCaller());
}
return;
}
if (event.getEventType().equals(ItemEventType.ADDED)) {
listener.itemAdded(itemEvent);
} else {
listener.itemRemoved(itemEvent);
}
}
Aggregations