Class HazelcastUtils
java.lang.Object
com.atlassian.confluence.cluster.hazelcast.HazelcastUtils
Contains HZ Member <-> NodeIdentifier conversion utils
- Since:
- 5.7
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Function<com.hazelcast.cluster.Member,
com.atlassian.cluster.monitoring.spi.model.NodeIdentifier> static Function<com.hazelcast.cluster.Member,
com.atlassian.cluster.monitoring.spi.model.NodeInformation> getConfiguredMemberName
(com.hazelcast.cluster.Member member) static String
getMemberId
(com.hazelcast.cluster.Member member) While we could just use the Member UUID here, this would change on every restart.static com.atlassian.cluster.monitoring.spi.model.NodeIdentifier
getMemberNodeIdentifier
(com.hazelcast.cluster.Member member) static com.hazelcast.cluster.MemberSelector
getMemberSelector
(com.atlassian.cluster.monitoring.spi.model.NodeIdentifier nodeIdentifier)
-
Field Details
-
CONFIGURED_NODE_NAME
- See Also:
-
-
Method Details
-
getMemberId
While we could just use the Member UUID here, this would change on every restart. By using the socketAddress as the basis for the node identifier, it will mostly remain the same across restarts, making diagnosis of node affinity problems easier. Also, InetSocketAddress has a bad hashCode implementation, so we bypass it. -
getMemberNodeIdentifier
public static com.atlassian.cluster.monitoring.spi.model.NodeIdentifier getMemberNodeIdentifier(com.hazelcast.cluster.Member member) -
getMemberSelector
public static com.hazelcast.cluster.MemberSelector getMemberSelector(com.atlassian.cluster.monitoring.spi.model.NodeIdentifier nodeIdentifier) -
extractNodeId
public static Function<com.hazelcast.cluster.Member,com.atlassian.cluster.monitoring.spi.model.NodeIdentifier> extractNodeId() -
getConfiguredMemberName
-
extractNodeInfo
public static Function<com.hazelcast.cluster.Member,com.atlassian.cluster.monitoring.spi.model.NodeInformation> extractNodeInfo()
-