use of com.hazelcast.spi.impl.servicemanager.ServiceManager 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);
}
}
use of com.hazelcast.spi.impl.servicemanager.ServiceManager in project hazelcast by hazelcast.
the class DefaultNodeExtension method onClusterVersionChange.
@Override
public void onClusterVersionChange(Version newVersion) {
systemLogger.info("Cluster version set to " + newVersion);
ServiceManager serviceManager = node.getNodeEngine().getServiceManager();
List<ClusterVersionListener> listeners = serviceManager.getServices(ClusterVersionListener.class);
for (ClusterVersionListener listener : listeners) {
listener.onClusterVersionChange(newVersion);
}
// also trigger cluster version change on explicitly registered listeners
for (ClusterVersionListener listener : clusterVersionListeners) {
listener.onClusterVersionChange(newVersion);
}
}
Aggregations