/** * Called upon shutdown of {@link com.hazelcast.map.impl.MapService} */ public void onShutdown() { lifecycleService.removeLifecycleListener(lifecycleListenerId); partitionService.removePartitionLostListener(partitionLostListenerId); }
/** * Called upon shutdown of {@link com.hazelcast.map.impl.MapService} */ public void onShutdown() { lifecycleService.removeLifecycleListener(lifecycleListenerId); partitionService.removePartitionLostListener(partitionLostListenerId); }
private void deregisterLifecycleListener() { LifecycleService lifecycleService = hazelcastInstance.getLifecycleService(); try { lifecycleService.removeLifecycleListener(lifecycleListenerRegistrationId); } catch (HazelcastInstanceNotActiveException e) { // if hazelcastInstance is already terminated, // `lifecycleService.removeLifecycleListener()` will throw a // HazelcastInstanceNotActiveException, which we can safely ignore // (see TerminatedLifecycleService) ignore(e); } }
private void deregisterLifecycleListener() { LifecycleService lifecycleService = hazelcastInstance.getLifecycleService(); try { lifecycleService.removeLifecycleListener(lifecycleListenerRegistrationId); } catch (HazelcastInstanceNotActiveException e) { // if hazelcastInstance is already terminated, // `lifecycleService.removeLifecycleListener()` will throw a // HazelcastInstanceNotActiveException, which we can safely ignore // (see TerminatedLifecycleService) ignore(e); } }
@Override public void shutdown() { ExecutionService executionService = nodeEngine.getExecutionService(); executionService.shutdownExecutor(invalidationExecutorName); HazelcastInstance node = nodeEngine.getHazelcastInstance(); LifecycleService lifecycleService = node.getLifecycleService(); lifecycleService.removeLifecycleListener(nodeShutdownListenerId); invalidationQueues.clear(); super.shutdown(); }
@Override public void shutdown() { ExecutionService executionService = nodeEngine.getExecutionService(); executionService.shutdownExecutor(invalidationExecutorName); HazelcastInstance node = nodeEngine.getHazelcastInstance(); LifecycleService lifecycleService = node.getLifecycleService(); lifecycleService.removeLifecycleListener(nodeShutdownListenerId); invalidationQueues.clear(); super.shutdown(); }
@Override protected void doStop() { if (this.hazelcastInstance.getLifecycleService().isRunning()) { String id = this.hazelcastRegisteredListenerIdMap.remove(ClusterMonitorType.MEMBERSHIP); if (id != null) { this.hazelcastInstance.getCluster().removeMembershipListener(id); } id = this.hazelcastRegisteredListenerIdMap.remove(ClusterMonitorType.DISTRIBUTED_OBJECT); if (id != null) { this.hazelcastInstance.removeDistributedObjectListener(id); } id = this.hazelcastRegisteredListenerIdMap.remove(ClusterMonitorType.MIGRATION); if (id != null) { this.hazelcastInstance.getPartitionService().removeMigrationListener(id); } id = this.hazelcastRegisteredListenerIdMap.remove(ClusterMonitorType.LIFECYCLE); if (id != null) { this.hazelcastInstance.getLifecycleService().removeLifecycleListener(id); } id = this.hazelcastRegisteredListenerIdMap.remove(ClusterMonitorType.CLIENT); if (id != null) { this.hazelcastInstance.getClientService().removeClientListener(id); } } }