Class IpdInterNodesStatsWithRemovalDelay
- java.lang.Object
-
- com.atlassian.confluence.internal.diagnostics.ipd.node.IpdInterNodesStats
-
- com.atlassian.confluence.internal.diagnostics.ipd.node.IpdInterNodesStatsWithRemovalDelay
-
public class IpdInterNodesStatsWithRemovalDelay extends IpdInterNodesStats
ExtendsIpdInterNodesStats
with a delay for removing latency/connection.state metrics from JMX for nodes that are no longer in the cluster. By default, it removes the metrics after 15L minutes from the last ping. The delay can be customized with the system property "node.jmx.removal.minutes".- Since:
- 8.8
-
-
Constructor Summary
Constructors Constructor Description IpdInterNodesStatsWithRemovalDelay(com.atlassian.diagnostics.internal.ipd.IpdMainRegistry mainRegistry, Clock clock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
remainMetricsForNodes(Set<String> otherNodeIds)
Checks if earlier stored node ids are still in the cluster.void
updateNodeLatency(String nodeId, long latencyNs)
Updates the last ping time for the node and calls super method.-
Methods inherited from class com.atlassian.confluence.internal.diagnostics.ipd.node.IpdInterNodesStats
removeMetricsForNode, setNodeDisconnected
-
-
-
-
Constructor Detail
-
IpdInterNodesStatsWithRemovalDelay
public IpdInterNodesStatsWithRemovalDelay(com.atlassian.diagnostics.internal.ipd.IpdMainRegistry mainRegistry, Clock clock)
-
-
Method Detail
-
remainMetricsForNodes
public void remainMetricsForNodes(Set<String> otherNodeIds)
Checks if earlier stored node ids are still in the cluster. If not and their last ping was later than the removal threshold, removes the metrics for that node. If not and their last ping was earlier than the removal threshold, sets the node as disconnected. It also updates thenodesStates
map with the ids of currently available nodes if they're absent.- Overrides:
remainMetricsForNodes
in classIpdInterNodesStats
- Parameters:
otherNodeIds
- - the set of ids of nodes that are currently in the cluster, without the current node
-
updateNodeLatency
public void updateNodeLatency(String nodeId, long latencyNs)
Updates the last ping time for the node and calls super method.- Overrides:
updateNodeLatency
in classIpdInterNodesStats
- Parameters:
nodeId
- - id of the node to be updatedlatencyNs
- - latency measured to the node
-
-