Package de.hybris.platform.cluster
Class DefaultClusterNodeManagementService
- java.lang.Object
-
- de.hybris.platform.cluster.DefaultClusterNodeManagementService
-
- All Implemented Interfaces:
ClusterNodeManagementService
public class DefaultClusterNodeManagementService extends java.lang.Object implements ClusterNodeManagementService
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<ClusterNodeInfo>findAllNodes()java.util.Collection<java.lang.String>getClusterGroups()intgetClusterID()Returns currently configured or acquired cluster ID.intgetConfiguredClusterID()static ClusterNodeManagementServicegetInstance()ClusterNodeAcquisition.NodeStategetNodeStartupState()In case of automatic cluster id acquisition this tells whether a previous instance with that ID has potentially crashed (ClusterNodeAcquisition.NodeState.RESTART_AFTER_SHUTDOWN) or whether it's been allocated anew (ClusterNodeAcquisition.NodeState.NEW).longgetStaleNodeTimeout()longgetUpdateInterval()booleanisAutoDiscoveryEnabled()Tells whether the cluster ID has been acquired automatically or not (fixedly configured in that case).protected voidreleaseAutomaticClusterID()
-
-
-
Method Detail
-
getInstance
public static ClusterNodeManagementService getInstance()
-
getClusterID
public int getClusterID()
Description copied from interface:ClusterNodeManagementServiceReturns currently configured or acquired cluster ID.- Specified by:
getClusterIDin interfaceClusterNodeManagementService
-
getClusterGroups
public java.util.Collection<java.lang.String> getClusterGroups()
- Specified by:
getClusterGroupsin interfaceClusterNodeManagementService
-
getNodeStartupState
public ClusterNodeAcquisition.NodeState getNodeStartupState()
Description copied from interface:ClusterNodeManagementServiceIn case of automatic cluster id acquisition this tells whether a previous instance with that ID has potentially crashed (ClusterNodeAcquisition.NodeState.RESTART_AFTER_SHUTDOWN) or whether it's been allocated anew (ClusterNodeAcquisition.NodeState.NEW).- Specified by:
getNodeStartupStatein interfaceClusterNodeManagementService
-
isAutoDiscoveryEnabled
public boolean isAutoDiscoveryEnabled()
Description copied from interface:ClusterNodeManagementServiceTells whether the cluster ID has been acquired automatically or not (fixedly configured in that case).- Specified by:
isAutoDiscoveryEnabledin interfaceClusterNodeManagementService
-
findAllNodes
public java.util.Collection<ClusterNodeInfo> findAllNodes()
- Specified by:
findAllNodesin interfaceClusterNodeManagementService
-
getConfiguredClusterID
public int getConfiguredClusterID()
- Specified by:
getConfiguredClusterIDin interfaceClusterNodeManagementService
-
getStaleNodeTimeout
public long getStaleNodeTimeout()
- Specified by:
getStaleNodeTimeoutin interfaceClusterNodeManagementService
-
getUpdateInterval
public long getUpdateInterval()
- Specified by:
getUpdateIntervalin interfaceClusterNodeManagementService
-
releaseAutomaticClusterID
protected void releaseAutomaticClusterID()
-
-