public class DefaultClusterNodeDAO extends Object implements ClusterNodeDAO
| Constructor and Description |
|---|
DefaultClusterNodeDAO(HybrisDataSource dataSource,
long maxAllowedPingDelay) |
| Modifier and Type | Method and Description |
|---|---|
ClusterNodeAcquisition |
acquireNodeID(ClusterNodeInfo newInfoTemplate) |
Collection<ClusterNodeInfo> |
findAll() |
Collection<ClusterNodeInfo> |
findStaleNodes() |
ClusterNodeInfo |
get(int id) |
protected String |
getCreateTableSQL(HybrisDataSource hds) |
protected long |
getLastLegalPingTS() |
protected ClusterNodeInfo |
getNextStaleNodeIDToReUse(Collection<ClusterNodeInfo> all) |
protected int |
getNextUnusedID(Collection<ClusterNodeInfo> all) |
protected String |
getTableName(HybrisDataSource hds) |
void |
initializePersistence() |
protected boolean |
insert(int id,
ClusterNodeInfo newInfoTemplate) |
void |
ping(int id) |
boolean |
remove(int id) |
protected boolean |
reset(ClusterNodeInfo toReset,
ClusterNodeInfo ownTemplate,
long newPingTS) |
public DefaultClusterNodeDAO(HybrisDataSource dataSource, long maxAllowedPingDelay)
protected String getTableName(HybrisDataSource hds)
protected String getCreateTableSQL(HybrisDataSource hds)
public void initializePersistence()
initializePersistence in interface ClusterNodeDAOpublic Collection<ClusterNodeInfo> findAll()
findAll in interface ClusterNodeDAOpublic Collection<ClusterNodeInfo> findStaleNodes()
findStaleNodes in interface ClusterNodeDAOpublic ClusterNodeInfo get(int id)
get in interface ClusterNodeDAOpublic boolean remove(int id)
remove in interface ClusterNodeDAOpublic void ping(int id)
ping in interface ClusterNodeDAOpublic ClusterNodeAcquisition acquireNodeID(ClusterNodeInfo newInfoTemplate)
acquireNodeID in interface ClusterNodeDAOprotected boolean reset(ClusterNodeInfo toReset, ClusterNodeInfo ownTemplate, long newPingTS)
protected boolean insert(int id,
ClusterNodeInfo newInfoTemplate)
protected ClusterNodeInfo getNextStaleNodeIDToReUse(Collection<ClusterNodeInfo> all)
protected long getLastLegalPingTS()
protected int getNextUnusedID(Collection<ClusterNodeInfo> all)
Copyright © 2017 SAP SE. All Rights Reserved.