public class CrowdClusterHeartbeatManager extends Object implements ClusterHeartbeatManager
Constructor and Description |
---|
CrowdClusterHeartbeatManager(ClusterHeartbeatDAOHibernate dao,
NodeDataProvider nodeDataProvider,
com.atlassian.event.api.EventPublisher eventPublisher) |
Modifier and Type | Method and Description |
---|---|
Collection<ClusterHeartbeatEntity> |
findHeartbeatsAfter(long timestamp) |
Collection<String> |
findNodesWithHeartbeatsAfter(long timestamp) |
Long |
getLastHeartbeatTime(String nodeId) |
String |
getNodeId() |
int |
removeHeartbeatsBefore(long timestamp)
Removes the heartbeats that heven't reported live before the given timestamp
|
void |
writeHeartBeat(long time) |
public CrowdClusterHeartbeatManager(ClusterHeartbeatDAOHibernate dao, NodeDataProvider nodeDataProvider, com.atlassian.event.api.EventPublisher eventPublisher)
@Nonnull public String getNodeId()
getNodeId
in interface com.atlassian.beehive.db.spi.ClusterNodeHeartBeatDao
public void writeHeartBeat(long time)
writeHeartBeat
in interface com.atlassian.beehive.db.spi.ClusterNodeHeartBeatDao
@Nullable public Long getLastHeartbeatTime(@Nonnull String nodeId)
getLastHeartbeatTime
in interface com.atlassian.beehive.db.spi.ClusterNodeHeartBeatDao
@Nonnull public Collection<String> findNodesWithHeartbeatsAfter(long timestamp)
findNodesWithHeartbeatsAfter
in interface com.atlassian.beehive.db.spi.ClusterNodeHeartBeatDao
public Collection<ClusterHeartbeatEntity> findHeartbeatsAfter(long timestamp)
findHeartbeatsAfter
in interface ClusterHeartbeatManager
public int removeHeartbeatsBefore(long timestamp)
ClusterHeartbeatManager
removeHeartbeatsBefore
in interface ClusterHeartbeatManager
Copyright © 2021 Atlassian. All rights reserved.