public class ClusterHeartbeatDAOHibernate extends HibernateDao
batchFinder, batchProcessor, logger, statelessSessionBatchProcessor, timeSourcesessionFactory| Constructor and Description |
|---|
ClusterHeartbeatDAOHibernate() |
| Modifier and Type | Method and Description |
|---|---|
List<ClusterHeartbeatEntity> |
findHeartbeatsAfter(long timestamp) |
ClusterHeartbeatEntity |
getHeartbeat(String nodeId) |
Class<ClusterHeartbeatEntity> |
getPersistentClass()
All subclasses of HibernateDao must implement this method for
HibernateDao.load(long) to work correctly. |
int |
removeHeartbeatsBefore(long timestamp) |
void |
writeHeartBeat(ClusterHeartbeatEntity heartbeatEntity)
Inserts or updates the heartbeat entity
|
String |
writeNewHeartbeat(Supplier<String> nodeIdSupplier,
String nodeName,
long timestamp)
Tries to insert a new heartbeat based on the parameters.
|
createHibernateQuery, load, load, loadReference, loadReference, remove, save, saveOrUpdate, session, setBatchFinder, setBatchProcessor, setClock, setStatelessSessionBatchProcessor, updatesetSessionFactory, withStatelessSessionpublic Class<ClusterHeartbeatEntity> getPersistentClass()
HibernateDaoHibernateDao.load(long) to work correctly.getPersistentClass in class HibernateDaopublic String writeNewHeartbeat(Supplier<String> nodeIdSupplier, String nodeName, long timestamp) throws OperationFailedException
nodeIdSupplier - a supplier of unique node idsnodeName - the desired node namestimestamp - the desired timestamp of the heartbeatOperationFailedException - if insertion fails despite retriespublic void writeHeartBeat(ClusterHeartbeatEntity heartbeatEntity) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException@Nullable public ClusterHeartbeatEntity getHeartbeat(String nodeId)
nodeId - the node id to find the heartbeat forpublic List<ClusterHeartbeatEntity> findHeartbeatsAfter(long timestamp)
public int removeHeartbeatsBefore(long timestamp)
Copyright © 2017 Atlassian. All rights reserved.