public void init() { logger.info( "HazelcastLifecycleMonitor initializing..." ); Hazelcast.addInstanceListener( this ); Hazelcast.getCluster().addMembershipListener( this ); logger.info( "HazelcastLifecycleMonitor initialized" ); }
public ClusterAppStateImpl(AppSettings settings, HazelcastMember hzMember, EsConnector esConnector) { this.hzMember = hzMember; // Get or create the replicated map operationalProcesses = (ReplicatedMap) hzMember.getReplicatedMap(OPERATIONAL_PROCESSES); operationalProcessListenerUUID = operationalProcesses.addEntryListener(new OperationalProcessListener()); nodeDisconnectedListenerUUID = hzMember.getCluster().addMembershipListener(new NodeDisconnectedListener()); if (ClusterSettings.isLocalElasticsearchEnabled(settings)) { this.healthStateSharing = new HealthStateSharingImpl(hzMember, new SearchNodeHealthProvider(settings.getProps(), this, NetworkUtilsImpl.INSTANCE)); this.healthStateSharing.start(); } this.esConnector = esConnector; }
@Override public final void init(Cluster cluster, ClientConfig config) { this.clusterRef = cluster; cluster.addMembershipListener(this); }
@Override public final void init(Cluster cluster, ClientConfig config) { this.clusterRef = cluster; cluster.addMembershipListener(this); }
AsyncInvalidationListener(Cluster cluster, Cache<K, ?> localCache, ITopic<K> topic) { this.cluster = cluster; this.localCacheRef = new WeakReference<>(localCache); this.topic = topic; this.topicListenerId = topic.addMessageListener(this); this.membershipListenerId = cluster.addMembershipListener(this); }
AsyncInvalidationListener(Cluster cluster, CachedReference<?> localReference, ITopic<ReferenceKey> topic) { this.cluster = cluster; this.localReferenceRef = new WeakReference<>(localReference); this.topic = topic; this.topicListenerId = topic.addMessageListener(this); this.membershipListenerId = cluster.addMembershipListener(this); }
public TopologyManagement(HazelcastInstance hzInstance) { //super(hzInstance); this.hzInstance = hzInstance; hzInstance.getCluster().addMembershipListener(this); }
public CellarMembershipListener(HazelcastInstance instance) { this.instance = instance; instance.getCluster().addMembershipListener(this); }
public SchemaManagement(HazelcastInstance hzInstance) { super(hzInstance); hzInstance.getCluster().addMembershipListener(this); }
public CellarMembershipListener(HazelcastInstance instance) { this.instance = instance; instance.getCluster().addMembershipListener(this); }
public void setHazelcastInstance(HazelcastInstance hzInstance) { logger.trace("setHazelcastInstance.enter"); this.hzInstance = hzInstance; hzInstance.getCluster().addMembershipListener(this); setupCaches(); }
public HazelcastInstanceConsumer(HazelcastInstance hazelcastInstance, DefaultEndpoint endpoint, Processor processor) { super(endpoint, processor); hazelcastInstance.getCluster().addMembershipListener(new HazelcastMembershipListener()); }
public AnalyticsClusterManagerImpl() { this.hz = AnalyticsServiceHolder.getHazelcastInstance(); if (this.isClusteringEnabled()) { this.hz.getCluster().addMembershipListener(this); } }
public AnalyticsClusterManagerImpl() { this.hz = AnalyticsServiceHolder.getHazelcastInstance(); if (this.isClusteringEnabled()) { this.hz.getCluster().addMembershipListener(this); } }
public HazelcastClusterManager(HazelcastInstance hazelcast) { this.hazelcast = hazelcast; this.nodeId = hazelcast.getCluster().getLocalMember().getUuid(); hazelcast.getCluster().addMembershipListener(this); }
public DistributedRegistry(String registryName, Object nodeInfo, HazelcastInstance hzInstance, int minutesToCheckRegister, int oldestMembersLeading) { this.registryName = registryName; this.nodeInfo = nodeInfo; this.hzInstance = hzInstance; hzInstance.getCluster().addMembershipListener(new MyListener()); hzInstance.getLifecycleService().addLifecycleListener(new RestartListener()); this.minutesToCheckRegister = minutesToCheckRegister; this.oldestMembersLeading = oldestMembersLeading; }
protected static CountDownLatch simulateSplitBrain(HazelcastInstance h1, HazelcastInstance h2) { SampleMemberShipListener memberShipListener = new SampleMemberShipListener(1); h2.getCluster().addMembershipListener(memberShipListener); SampleLifeCycleListener lifeCycleListener = new SampleLifeCycleListener(1); h2.getLifecycleService().addLifecycleListener(lifeCycleListener); closeConnectionBetween(h1, h2); assertOpenEventually(memberShipListener.latch); assertClusterSizeEventually(1, h1); assertClusterSizeEventually(1, h2); return lifeCycleListener.latch; }
public ClusterAppStateImpl(AppSettings settings, HazelcastMember hzMember) { this.hzMember = hzMember; // Get or create the replicated map operationalProcesses = (ReplicatedMap) hzMember.getReplicatedMap(OPERATIONAL_PROCESSES); operationalProcessListenerUUID = operationalProcesses.addEntryListener(new OperationalProcessListener()); nodeDisconnectedListenerUUID = hzMember.getCluster().addMembershipListener(new NodeDisconnectedListener()); if (ClusterSettings.isLocalElasticsearchEnabled(settings)) { this.healthStateSharing = new HealthStateSharingImpl(hzMember, new SearchNodeHealthProvider(settings.getProps(), this, NetworkUtilsImpl.INSTANCE)); this.healthStateSharing.start(); } }
@Override public void onStart() { logger.info("Plugin:active: logPartitions:" + logPartitions); connectionObservable.addConnectionListener(new ConnectionListenerImpl()); hazelcastInstance.getCluster().addMembershipListener(new MembershipListenerImpl()); if (logPartitions) { hazelcastInstance.getPartitionService().addMigrationListener(new MigrationListenerImpl()); } hazelcastInstance.getLifecycleService().addLifecycleListener(new LifecycleListenerImpl()); if (nodeExtension != null) { nodeExtension.registerListener(new ClusterVersionListenerImpl()); } }
@Override public void onStart() { logger.info("Plugin:active: logPartitions:" + logPartitions); connectionObservable.addConnectionListener(new ConnectionListenerImpl()); hazelcastInstance.getCluster().addMembershipListener(new MembershipListenerImpl()); if (logPartitions) { hazelcastInstance.getPartitionService().addMigrationListener(new MigrationListenerImpl()); } hazelcastInstance.getLifecycleService().addLifecycleListener(new LifecycleListenerImpl()); if (nodeExtension != null) { nodeExtension.registerListener(new ClusterVersionListenerImpl()); } }