Package org.openspaces.pu.sla
Class PrimaryZoneController
java.lang.Object
org.openspaces.pu.sla.PrimaryZoneController
- All Implemented Interfaces:
ClusterInfoAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean
public class PrimaryZoneController
extends Object
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, ClusterInfoAware
PrimaryZoneController is a task that runs periodically and checks if primary-zone
definition is violated: 1. backups in primary zone 2. primaries in backup zone if it happens
instances are restarted and balance is restored.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddestroy()intvoidsetClusterInfo(ClusterInfo clusterInfo) Sets the cluster information.voidsetDelayBetweenChecks(int delayBetweenChecks) voidsetPrimaryZone(String primaryZone) voidsetSecurityConfig(SecurityConfig securityConfig)
-
Constructor Details
-
PrimaryZoneController
public PrimaryZoneController()
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
getPrimaryZone
-
setPrimaryZone
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean
-
getDelayBetweenChecks
public int getDelayBetweenChecks() -
setDelayBetweenChecks
public void setDelayBetweenChecks(int delayBetweenChecks) -
setClusterInfo
Description copied from interface:ClusterInfoAwareSets the cluster information.Note, the cluster information is obtained externally from the application context which means that this feature need to be supported by specific containers (and is not supported by plain Spring application context). This means that beans that implement
ClusterInfoAwareshould take into account the fact that the cluster info provided might be null.- Specified by:
setClusterInfoin interfaceClusterInfoAware- Parameters:
clusterInfo- The cluster information to be injected
-
getSecurityConfig
-
setSecurityConfig
-