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 Details

    • PrimaryZoneController

      public PrimaryZoneController()
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • getPrimaryZone

      public String getPrimaryZone()
    • setPrimaryZone

      public void setPrimaryZone(String primaryZone)
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
    • getDelayBetweenChecks

      public int getDelayBetweenChecks()
    • setDelayBetweenChecks

      public void setDelayBetweenChecks(int delayBetweenChecks)
    • setClusterInfo

      public void setClusterInfo(ClusterInfo clusterInfo)
      Description copied from interface: ClusterInfoAware
      Sets 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 ClusterInfoAware should take into account the fact that the cluster info provided might be null.

      Specified by:
      setClusterInfo in interface ClusterInfoAware
      Parameters:
      clusterInfo - The cluster information to be injected
    • getSecurityConfig

      public SecurityConfig getSecurityConfig()
    • setSecurityConfig

      public void setSecurityConfig(SecurityConfig securityConfig)