@Override public EventService getEventService() { return nodeEngine.getEventService(); }
public boolean removePartitionLostListener(String registrationId) { if (registrationId == null) { throw new NullPointerException("registrationId can't be null"); } EventService eventService = nodeEngine.getEventService(); return eventService.deregisterListener(SERVICE_NAME, PARTITION_LOST_EVENT_TOPIC, registrationId); }
public boolean removeMigrationListener(String registrationId) { if (registrationId == null) { throw new NullPointerException("registrationId can't be null"); } EventService eventService = nodeEngine.getEventService(); return eventService.deregisterListener(SERVICE_NAME, MIGRATION_EVENT_TOPIC, registrationId); }
public boolean removePartitionLostListener(String registrationId) { if (registrationId == null) { throw new NullPointerException("registrationId can't be null"); } EventService eventService = nodeEngine.getEventService(); return eventService.deregisterListener(SERVICE_NAME, PARTITION_LOST_EVENT_TOPIC, registrationId); }
public boolean removeMigrationListener(String registrationId) { if (registrationId == null) { throw new NullPointerException("registrationId can't be null"); } EventService eventService = nodeEngine.getEventService(); return eventService.deregisterListener(SERVICE_NAME, MIGRATION_EVENT_TOPIC, registrationId); }
@Override public void run() throws Exception { if (registrations == null || registrations.size() <= 0) { return; } NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine(); EventServiceImpl eventService = (EventServiceImpl) nodeEngine.getEventService(); for (Registration reg : registrations) { eventService.handleRegistration(reg); } }
@Override public void run() throws Exception { if (registrations == null || registrations.size() <= 0) { return; } NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine(); EventServiceImpl eventService = (EventServiceImpl) nodeEngine.getEventService(); for (Registration reg : registrations) { eventService.handleRegistration(reg); } }
public boolean removeMembershipListener(String registrationId) { checkNotNull(registrationId, "registrationId cannot be null"); EventService eventService = nodeEngine.getEventService(); return eventService.deregisterListener(SERVICE_NAME, SERVICE_NAME, registrationId); }
public String addLocalPartitionLostListener(PartitionLostListener listener) { if (listener == null) { throw new NullPointerException("listener can't be null"); } final PartitionLostListenerAdapter adapter = new PartitionLostListenerAdapter(listener); EventService eventService = nodeEngine.getEventService(); EventRegistration registration = eventService.registerLocalListener(SERVICE_NAME, PARTITION_LOST_EVENT_TOPIC, adapter); return registration.getId(); }
private void publish(DistributedObjectEventPacket event) { EventService eventService = proxyService.nodeEngine.getEventService(); Collection<EventRegistration> registrations = eventService.getRegistrations( ProxyServiceImpl.SERVICE_NAME, ProxyServiceImpl.SERVICE_NAME); eventService.publishRemoteEvent(ProxyServiceImpl.SERVICE_NAME, registrations, event, event.getName().hashCode()); }
public String addMigrationListener(MigrationListener listener) { if (listener == null) { throw new NullPointerException("listener can't be null"); } final MigrationListenerAdapter adapter = new MigrationListenerAdapter(listener); EventService eventService = nodeEngine.getEventService(); EventRegistration registration = eventService.registerListener(SERVICE_NAME, MIGRATION_EVENT_TOPIC, adapter); return registration.getId(); }
public String addPartitionLostListener(PartitionLostListener listener) { if (listener == null) { throw new NullPointerException("listener can't be null"); } final PartitionLostListenerAdapter adapter = new PartitionLostListenerAdapter(listener); EventService eventService = nodeEngine.getEventService(); EventRegistration registration = eventService.registerListener(SERVICE_NAME, PARTITION_LOST_EVENT_TOPIC, adapter); return registration.getId(); }
public String addPartitionLostListener(PartitionLostListener listener) { if (listener == null) { throw new NullPointerException("listener can't be null"); } final PartitionLostListenerAdapter adapter = new PartitionLostListenerAdapter(listener); EventService eventService = nodeEngine.getEventService(); EventRegistration registration = eventService.registerListener(SERVICE_NAME, PARTITION_LOST_EVENT_TOPIC, adapter); return registration.getId(); }
public String addLocalPartitionLostListener(PartitionLostListener listener) { if (listener == null) { throw new NullPointerException("listener can't be null"); } final PartitionLostListenerAdapter adapter = new PartitionLostListenerAdapter(listener); EventService eventService = nodeEngine.getEventService(); EventRegistration registration = eventService.registerLocalListener(SERVICE_NAME, PARTITION_LOST_EVENT_TOPIC, adapter); return registration.getId(); }
QuorumImpl(QuorumConfig config, NodeEngineImpl nodeEngine) { this.nodeEngine = nodeEngine; this.eventService = nodeEngine.getEventService(); this.config = config; this.quorumName = config.getName(); this.size = config.getSize(); this.quorumFunction = initializeQuorumFunction(); this.heartbeatAwareQuorumFunction = (quorumFunction instanceof HeartbeatAware); this.membershipListenerQuorumFunction = (quorumFunction instanceof MembershipListener); this.pingAwareQuorumFunction = (quorumFunction instanceof PingAware); }
QuorumImpl(QuorumConfig config, NodeEngineImpl nodeEngine) { this.nodeEngine = nodeEngine; this.eventService = nodeEngine.getEventService(); this.config = config; this.quorumName = config.getName(); this.size = config.getSize(); this.quorumFunction = initializeQuorumFunction(); this.heartbeatAwareQuorumFunction = (quorumFunction instanceof HeartbeatAware); this.membershipListenerQuorumFunction = (quorumFunction instanceof MembershipListener); this.pingAwareQuorumFunction = (quorumFunction instanceof PingAware); }
public void onPartitionLost(IPartitionLostEvent event) { final PartitionLostEvent partitionLostEvent = new PartitionLostEvent(event.getPartitionId(), event.getLostReplicaIndex(), event.getEventSource()); final EventService eventService = nodeEngine.getEventService(); final Collection<EventRegistration> registrations = eventService .getRegistrations(SERVICE_NAME, PARTITION_LOST_EVENT_TOPIC); eventService.publishEvent(SERVICE_NAME, registrations, partitionLostEvent, event.getPartitionId()); }
public void onPartitionLost(IPartitionLostEvent event) { final PartitionLostEvent partitionLostEvent = new PartitionLostEvent(event.getPartitionId(), event.getLostReplicaIndex(), event.getEventSource()); final EventService eventService = nodeEngine.getEventService(); final Collection<EventRegistration> registrations = eventService .getRegistrations(SERVICE_NAME, PARTITION_LOST_EVENT_TOPIC); eventService.publishEvent(SERVICE_NAME, registrations, partitionLostEvent, event.getPartitionId()); }
private void registerCoreServices() { logger.finest("Registering core services..."); Node node = nodeEngine.getNode(); registerService(ClusterServiceImpl.SERVICE_NAME, node.getClusterService()); registerService(InternalPartitionService.SERVICE_NAME, node.getPartitionService()); registerService(ProxyServiceImpl.SERVICE_NAME, nodeEngine.getProxyService()); registerService(TransactionManagerServiceImpl.SERVICE_NAME, nodeEngine.getTransactionManagerService()); registerService(ClientEngineImpl.SERVICE_NAME, node.clientEngine); registerService(QuorumServiceImpl.SERVICE_NAME, nodeEngine.getQuorumService()); registerService(WanReplicationService.SERVICE_NAME, nodeEngine.getWanReplicationService()); registerService(EventServiceImpl.SERVICE_NAME, nodeEngine.getEventService()); }
private void registerCoreServices() { logger.finest("Registering core services..."); Node node = nodeEngine.getNode(); registerService(ClusterServiceImpl.SERVICE_NAME, node.getClusterService()); registerService(InternalPartitionService.SERVICE_NAME, node.getPartitionService()); registerService(ProxyServiceImpl.SERVICE_NAME, nodeEngine.getProxyService()); registerService(TransactionManagerServiceImpl.SERVICE_NAME, nodeEngine.getTransactionManagerService()); registerService(ClientEngineImpl.SERVICE_NAME, node.clientEngine); registerService(QuorumServiceImpl.SERVICE_NAME, nodeEngine.getQuorumService()); registerService(WanReplicationService.SERVICE_NAME, nodeEngine.getWanReplicationService()); registerService(EventServiceImpl.SERVICE_NAME, nodeEngine.getEventService()); }