Class NoOpClusterNodeHeartbeatService
java.lang.Object
com.atlassian.crowd.manager.cluster.heartbeat.NoOpClusterNodeHeartbeatService
- All Implemented Interfaces:
ClusterNodeHeartbeatService,ClusterHeartbeatService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns all nodes that have sent a heartbeat within the default threshold time.findLiveNodes(long threshold) Returns all nodes that have sent a heartbeat within the given threshold.getLastHeartbeatTime(String nodeId) Returns the last time a heartbeat was sent by the given node.Returns the node ID for this node.booleanisNodeLive(String nodeId) Checks whether the given cluster node is considered "live".
-
Constructor Details
-
NoOpClusterNodeHeartbeatService
public NoOpClusterNodeHeartbeatService()
-
-
Method Details
-
getNodeId
Description copied from interface:ClusterNodeHeartbeatServiceReturns the node ID for this node.- Specified by:
getNodeIdin interfaceClusterNodeHeartbeatService- Returns:
- the node ID for this node.
-
isNodeLive
Description copied from interface:ClusterNodeHeartbeatServiceChecks whether the given cluster node is considered "live".Each live node will be writing a heartbeat on a set schedule (eg once a minute). A node is considered live if it has written a heartbeat within a reasonable tolerance level (eg 5 minutes).
The tolerance level needs to be large enough to avoid certain expected slow-downs in the system including GC pauses, or just general slowness in the JVM / scheduler / network / database of the remote node.
- Specified by:
isNodeLivein interfaceClusterNodeHeartbeatService- Parameters:
nodeId- the cluster node to check- Returns:
- true iff the given cluster node is still "live".
-
getLastHeartbeatTime
Description copied from interface:ClusterNodeHeartbeatServiceReturns the last time a heartbeat was sent by the given node.A
nullvalue indicates no heartbeats have ever been sent by the given node.- Specified by:
getLastHeartbeatTimein interfaceClusterNodeHeartbeatService- Parameters:
nodeId- the node- Returns:
- the last time a heartbeat was sent by the given node.
-
findLiveNodes
Description copied from interface:ClusterNodeHeartbeatServiceReturns all nodes that have sent a heartbeat within the default threshold time.- Specified by:
findLiveNodesin interfaceClusterNodeHeartbeatService- Returns:
- all nodes that have sent a heartbeat within the default threshold time.
- See Also:
-
findLiveNodes
Description copied from interface:ClusterNodeHeartbeatServiceReturns all nodes that have sent a heartbeat within the given threshold.- Specified by:
findLiveNodesin interfaceClusterNodeHeartbeatService- Parameters:
threshold- the threshold in milliseconds- Returns:
- all nodes that have sent a heartbeat within the given threshold.
- See Also:
-
getNodeHearbeats
- Specified by:
getNodeHearbeatsin interfaceClusterHeartbeatService- Returns:
- a list of nodes that have reported a hearbeat recently
-