Class HazelcastUtils
- java.lang.Object
-
- com.atlassian.confluence.cluster.hazelcast.HazelcastUtils
-
@Internal public final class HazelcastUtils extends Object
Contains HZ Member <-> NodeIdentifier conversion utils- Since:
- 5.7
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONFIGURED_NODE_NAME
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Function<com.hazelcast.core.Member,com.atlassian.cluster.monitoring.spi.model.NodeIdentifier>
extractNodeId()
static Function<com.hazelcast.core.Member,com.atlassian.cluster.monitoring.spi.model.NodeInformation>
extractNodeInfo()
static Optional<String>
getConfiguredMemberName(com.hazelcast.core.Member member)
static String
getMemberId(com.hazelcast.core.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.core.Member member)
static com.hazelcast.core.MemberSelector
getMemberSelector(com.atlassian.cluster.monitoring.spi.model.NodeIdentifier nodeIdentifier)
-
-
-
Field Detail
-
CONFIGURED_NODE_NAME
public static final String CONFIGURED_NODE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getMemberId
public static String getMemberId(com.hazelcast.core.Member member)
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.core.Member member)
-
getMemberSelector
public static com.hazelcast.core.MemberSelector getMemberSelector(com.atlassian.cluster.monitoring.spi.model.NodeIdentifier nodeIdentifier)
-
extractNodeId
public static Function<com.hazelcast.core.Member,com.atlassian.cluster.monitoring.spi.model.NodeIdentifier> extractNodeId()
-
getConfiguredMemberName
public static Optional<String> getConfiguredMemberName(com.hazelcast.core.Member member)
-
extractNodeInfo
public static Function<com.hazelcast.core.Member,com.atlassian.cluster.monitoring.spi.model.NodeInformation> extractNodeInfo()
-
-