Package de.hybris.platform.cluster
Class DefaultClusterNodeDAO
- java.lang.Object
-
- de.hybris.platform.cluster.DefaultClusterNodeDAO
-
- All Implemented Interfaces:
ClusterNodeDAO
public class DefaultClusterNodeDAO extends java.lang.Object implements ClusterNodeDAO
-
-
Constructor Summary
Constructors Constructor Description DefaultClusterNodeDAO(HybrisDataSource dataSource, long maxAllowedPingDelay)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClusterNodeAcquisitionacquireNodeID(ClusterNodeInfo newInfoTemplate)java.util.Collection<ClusterNodeInfo>findAll()java.util.Collection<ClusterNodeInfo>findStaleNodes()ClusterNodeInfoget(int id)protected java.lang.StringgetCreateTableSQL(HybrisDataSource hds)protected longgetLastLegalPingTS()protected ClusterNodeInfogetNextStaleNodeIDToReUse(java.util.Collection<ClusterNodeInfo> all)protected intgetNextUnusedID(java.util.Collection<ClusterNodeInfo> all)protected java.lang.StringgetTableName(HybrisDataSource hds)voidinitializePersistence()protected booleaninsert(int id, ClusterNodeInfo newInfoTemplate)voidping(int id)booleanremove(int id)protected booleanreset(ClusterNodeInfo toReset, ClusterNodeInfo ownTemplate, long newPingTS)
-
-
-
Constructor Detail
-
DefaultClusterNodeDAO
public DefaultClusterNodeDAO(HybrisDataSource dataSource, long maxAllowedPingDelay)
-
-
Method Detail
-
getTableName
protected java.lang.String getTableName(HybrisDataSource hds)
-
getCreateTableSQL
protected java.lang.String getCreateTableSQL(HybrisDataSource hds)
-
initializePersistence
public void initializePersistence()
- Specified by:
initializePersistencein interfaceClusterNodeDAO
-
findAll
public java.util.Collection<ClusterNodeInfo> findAll()
- Specified by:
findAllin interfaceClusterNodeDAO
-
findStaleNodes
public java.util.Collection<ClusterNodeInfo> findStaleNodes()
- Specified by:
findStaleNodesin interfaceClusterNodeDAO
-
get
public ClusterNodeInfo get(int id)
- Specified by:
getin interfaceClusterNodeDAO
-
remove
public boolean remove(int id)
- Specified by:
removein interfaceClusterNodeDAO
-
ping
public void ping(int id)
- Specified by:
pingin interfaceClusterNodeDAO
-
acquireNodeID
public ClusterNodeAcquisition acquireNodeID(ClusterNodeInfo newInfoTemplate)
- Specified by:
acquireNodeIDin interfaceClusterNodeDAO
-
reset
protected boolean reset(ClusterNodeInfo toReset, ClusterNodeInfo ownTemplate, long newPingTS)
-
insert
protected boolean insert(int id, ClusterNodeInfo newInfoTemplate)
-
getNextStaleNodeIDToReUse
protected ClusterNodeInfo getNextStaleNodeIDToReUse(java.util.Collection<ClusterNodeInfo> all)
-
getLastLegalPingTS
protected long getLastLegalPingTS()
-
getNextUnusedID
protected int getNextUnusedID(java.util.Collection<ClusterNodeInfo> all)
-
-