Class IpdInterNodesStatsWithRemovalDelay


  • public class IpdInterNodesStatsWithRemovalDelay
    extends IpdInterNodesStats
    Extends IpdInterNodesStats 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 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 the nodesStates map with the ids of currently available nodes if they're absent.
        Overrides:
        remainMetricsForNodes in class IpdInterNodesStats
        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 class IpdInterNodesStats
        Parameters:
        nodeId - - id of the node to be updated
        latencyNs - - latency measured to the node