Examples of EventService


Examples of com.hazelcast.spi.EventService

    public boolean returnsResponse() {
        return true;
    }

    public boolean hasListener() {
        EventService eventService = getNodeEngine().getEventService();
        Collection<EventRegistration> registrations = eventService.getRegistrations(getServiceName(), name);
        return registrations.size() > 0;
    }
View Full Code Here

Examples of com.hazelcast.spi.EventService

        Collection<EventRegistration> registrations = eventService.getRegistrations(getServiceName(), name);
        return registrations.size() > 0;
    }

    public void publishEvent(ItemEventType eventType, Data data) {
        EventService eventService = getNodeEngine().getEventService();
        Collection<EventRegistration> registrations = eventService.getRegistrations(getServiceName(), name);
        Address thisAddress = getNodeEngine().getThisAddress();
        for (EventRegistration registration : registrations) {
            QueueEventFilter filter = (QueueEventFilter) registration.getFilter();
            QueueEvent event = new QueueEvent(name, filter.isIncludeValue() ? data : null, eventType, thisAddress);
            eventService.publishEvent(getServiceName(), registration, event, name.hashCode());
        }
    }
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();
        QueueEventFilter filter = new QueueEventFilter(includeValue);
        EventRegistration registration = eventService.registerListener(
                QueueService.SERVICE_NAME, name, filter, listener);
        return registration.getId();
    }
View Full Code Here

Examples of com.hazelcast.spi.EventService

                QueueService.SERVICE_NAME, name, filter, 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

        createRuntimeProps(memberState);
        createMemState(memberState, proxyObjects);
    }

    private void createJMXBeans(MemberStateImpl memberState) {
        final EventService es = instance.node.nodeEngine.getEventService();
        final OperationService os = instance.node.nodeEngine.getOperationService();
        final ConnectionManager cm = instance.node.connectionManager;
        final InternalPartitionService ps = instance.node.partitionService;
        final ProxyService proxyService = instance.node.nodeEngine.getProxyService();
        final ExecutionService executionService = instance.node.nodeEngine.getExecutionService();
View Full Code Here

Examples of com.hazelcast.spi.EventService

        sendClientEvent(endpoint);
    }

    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

    public boolean returnsResponse() {
        return true;
    }

    public final boolean hasListener() {
        EventService eventService = getNodeEngine().getEventService();
        Collection<EventRegistration> registrations = eventService.getRegistrations(getServiceName(), name);
        return registrations.size() > 0;
    }
View Full Code Here

Examples of org.apache.curator.x.rpc.idl.services.EventService

    public CuratorProjectionServer(Configuration configuration)
    {
        this.configuration = configuration;
        connectionManager = new ConnectionManager(configuration.getConnections(), configuration.getProjectionExpiration().toMillis());
        EventService eventService = new EventService(connectionManager, configuration.getPingTime().toMillis());
        DiscoveryService discoveryService = new DiscoveryService(connectionManager);
        CuratorProjectionService projectionService = new CuratorProjectionService(connectionManager);
        DiscoveryServiceLowLevel discoveryServiceLowLevel = new DiscoveryServiceLowLevel(connectionManager);
        ThriftServiceProcessor processor = new ThriftServiceProcessor(new ThriftCodecManager(), Lists.<ThriftEventHandler>newArrayList(), projectionService, eventService, discoveryService, discoveryServiceLowLevel);
        server = new ThriftServer(processor, configuration.getThrift());
View Full Code Here

Examples of org.apache.directory.server.core.api.event.EventService

    /**
     * {@inheritDoc}
     */
    public void stop()
    {
        EventService evtSrv = dirService.getEventService();

        evtSrv.removeListener( cledListener );
        //first set the 'stop' flag
        logJanitor.stopCleaning();
        //then interrupt the janitor
        logJanitor.interrupt();

        for ( ReplicaEventLog log : replicaLogMap.values() )
        {
            try
            {
                PROVIDER_LOG.debug( "Stopping the logging for replica ", log.getId() );
                evtSrv.removeListener( log.getPersistentListener() );
                log.stop();
            }
            catch ( Exception e )
            {
                PROVIDER_LOG.error( "Failed to close the event log {}", log.getId(), e );
View Full Code Here

Examples of org.apache.directory.server.core.api.event.EventService

    /**
     * {@inheritDoc}
     */
    public void stop()
    {
        EventService evtSrv = dirService.getEventService();
       
        evtSrv.removeListener( cledListener );
        //first set the 'stop' flag
        logJanitor.stopCleaning();
        //then interrupt the janitor
        logJanitor.interrupt();
       
        for ( ReplicaEventLog log : replicaLogMap.values() )
        {
            try
            {
                PROVIDER_LOG.debug( "Stopping the logging for replica ", log.getId() );
                evtSrv.removeListener( log.getPersistentListener() );
                log.stop();
            }
            catch ( Exception e )
            {
                LOG.warn( "Failed to close the event log {}", log.getId(), e );
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.