Search in sources :

Example 1 with ClusterStateListener

use of com.hazelcast.internal.cluster.ClusterStateListener in project hazelcast by hazelcast.

the class DefaultNodeExtension method onClusterStateChange.

@Override
public void onClusterStateChange(ClusterState newState, boolean isTransient) {
    ServiceManager serviceManager = node.getNodeEngine().getServiceManager();
    List<ClusterStateListener> listeners = serviceManager.getServices(ClusterStateListener.class);
    for (ClusterStateListener listener : listeners) {
        listener.onClusterStateChange(newState);
    }
}
Also used : ServiceManager(com.hazelcast.spi.impl.servicemanager.ServiceManager) ClusterStateListener(com.hazelcast.internal.cluster.ClusterStateListener)

Aggregations

ClusterStateListener (com.hazelcast.internal.cluster.ClusterStateListener)1 ServiceManager (com.hazelcast.spi.impl.servicemanager.ServiceManager)1