Examples of EventService


Examples of com.hazelcast.spi.EventService

        super.afterRun();
        if (eventType == __NO_NEED_TO_FIRE_EVENT) {
            return;
        }
        InMemoryFormat format = mapContainer.getMapConfig().getInMemoryFormat();
        EventService eventService = mapService.getNodeEngine().getEventService();
        String serviceName = getServiceName();
        if (eventService.hasEventRegistration(serviceName,name)){
            if (format == InMemoryFormat.OBJECT && eventType != EntryEventType.REMOVED) {
                oldValue = null;
            }
            mapService.publishEvent(getCallerAddress(), name, eventType, dataKey, mapService.toData(oldValue), dataValue);
        }
View Full Code Here

Examples of com.hazelcast.spi.EventService

        containerMap.remove(name);
        nodeEngine.getEventService().deregisterAllListeners(SERVICE_NAME, name);
    }

    public String addItemListener(String name, ItemListener listener, boolean includeValue) {
        EventService eventService = nodeEngine.getEventService();
        EventRegistration registration = eventService.registerListener(QueueService.SERVICE_NAME, name, new QueueEventFilter(includeValue), listener);
        return registration.getId();
    }
View Full Code Here

Examples of com.hazelcast.spi.EventService

        EventRegistration registration = eventService.registerListener(QueueService.SERVICE_NAME, name, new QueueEventFilter(includeValue), listener);
        return registration.getId();
    }

    public boolean removeItemListener(String name, String registrationId) {
        EventService eventService = nodeEngine.getEventService();
        return eventService.deregisterListener(SERVICE_NAME, name, registrationId);
    }
View Full Code Here

Examples of com.hazelcast.spi.EventService

                    PortableItemEvent portableItemEvent = new PortableItemEvent(item, event.getEventType(), event.getMember().getUuid());
                    endpoint.sendEvent(portableItemEvent, getCallId());
                }
            }
        };
        final EventService eventService = clientEngine.getEventService();
        final EventRegistration registration = eventService.registerListener(getServiceName(), name, new CollectionEventFilter(includeValue), listener);
        final String registrationId = registration.getId();
        endpoint.setListenerRegistration(getServiceName(), name, registrationId);
        return registrationId;
    }
View Full Code Here

Examples of com.hazelcast.spi.EventService

    public void setListenerRegistration(final String service, final String topic, final String id) {
        destroyActions.add(new Runnable() {
            @Override
            public void run() {
                EventService eventService = clientEngine.getEventService();
                eventService.deregisterListener(service, topic, id);
            }
        });
    }
View Full Code Here

Examples of com.hazelcast.spi.EventService

        sendClientEvent(endpoint);
    }

    private void sendClientEvent(ClientEndpoint endpoint) {
        if (!endpoint.isFirstConnection()) {
            final EventService eventService = nodeEngine.getEventService();
            final Collection<EventRegistration> regs = eventService.getRegistrations(SERVICE_NAME, SERVICE_NAME);
            eventService.publishEvent(SERVICE_NAME, regs, endpoint, endpoint.getUuid().hashCode());
        }
    }
View Full Code Here

Examples of com.hazelcast.spi.EventService

    @Override
    public void memberAttributeChanged(MemberAttributeServiceEvent event) {
    }

    String addClientListener(ClientListener clientListener) {
        EventService eventService = nodeEngine.getEventService();
        EventRegistration registration = eventService
                .registerLocalListener(SERVICE_NAME, SERVICE_NAME, clientListener);
        return registration.getId();
    }
View Full Code Here

Examples of com.hazelcast.spi.EventService

                        }
                    }
                });
            }
        }
        final EventService eventService = nodeEngine.getEventService();
        Collection<EventRegistration> registrations = eventService.getRegistrations(SERVICE_NAME, SERVICE_NAME);
        for (EventRegistration reg : registrations) {
            eventService.publishEvent(SERVICE_NAME, reg, membershipEvent, reg.getId().hashCode());
        }
    }
View Full Code Here

Examples of com.hazelcast.spi.EventService

                        service.memberAttributeChanged(event);
                    }
                });
            }
        }
        final EventService eventService = nodeEngine.getEventService();
        Collection<EventRegistration> registrations = eventService.getRegistrations(SERVICE_NAME, SERVICE_NAME);
        for (EventRegistration reg : registrations) {
            eventService.publishEvent(SERVICE_NAME, reg, memberAttributeEvent, reg.getId().hashCode());
        }
    }
View Full Code Here

Examples of com.hazelcast.spi.EventService

                }
            }
        }

        private void publish(DistributedObjectEventPacket event) {
            final EventService eventService = nodeEngine.getEventService();
            final Collection<EventRegistration> registrations = eventService.getRegistrations(SERVICE_NAME, SERVICE_NAME);
            eventService.publishEvent(SERVICE_NAME, registrations, event, event.getName().hashCode());
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.