public interface ClusterVersionListener
ServiceManager
which implement this
interface do not have have to register themselves, as their onClusterVersionChange(Version)
method will be
invoked automatically.
Other listeners have to register themselves with NodeExtension.registerListener(Object)
.
Upon registration, the listener's onClusterVersionChange(Version)
method will be invoked once with the current
value of the cluster version.Cluster.getClusterVersion()
,
Cluster.changeClusterVersion(Version)
Modifier and Type | Method and Description |
---|---|
void |
onClusterVersionChange(Version newVersion)
Invoked on registered listeners after the new cluster version has been applied.
|
void onClusterVersionChange(Version newVersion)
ClusterStateManager#version
has been updated and while the cluster service lock
ClusterServiceImpl#lock
is still locked, as part of the commit phase of the transaction changing
the cluster version. Unhandled exceptions from listeners implementation will break the new version commit and a slow
implementation will stall the system and may cause a transaction timeout.
If new cluster version is null
and property
GroupProperty.INIT_CLUSTER_VERSION
is set, the version set by this property
will be provided as argument to the listener. If neither are set, running node's codebase version will be used.newVersion
- the new versionCopyright © 2021 Hazelcast, Inc.. All Rights Reserved.