Package com.atlassian.beehive.db.spi
Interface ClusterNodeHeartBeatDao
- All Known Subinterfaces:
ClusterHeartbeatManager
- All Known Implementing Classes:
CrowdClusterHeartbeatManager
,NoOpClusterHeartbeatManager
public interface ClusterNodeHeartBeatDao
Clustered applications need to implement this DAO in order to be able to use the
DatabaseClusterLockService
.-
Method Summary
Modifier and TypeMethodDescriptionfindNodesWithHeartbeatsAfter
(long time) getLastHeartbeatTime
(String nodeId) Returns the last time a heartbeat was sent by the given node.Returns the globally unique Identifier for this cluster node.void
writeHeartBeat
(long time) Writes a heartbeat for this node at the given time.
-
Method Details
-
getNodeId
Returns the globally unique Identifier for this cluster node.- Returns:
- the globally unique Identifier for this cluster node.
-
writeHeartBeat
void writeHeartBeat(long time) Writes a heartbeat for this node at the given time. Caller will pass the time to stamp; in production this would normally beSystem.currentTimeMillis()
.- Parameters:
time
- the time in millis to write as the heartbeat.
-
getLastHeartbeatTime
Returns the last time a heartbeat was sent by the given node.A
null
value indicates no heartbeats have been sent by this node.- Parameters:
nodeId
- the node- Returns:
- the last time a heartbeat was sent by the given node.
-
findNodesWithHeartbeatsAfter
-