public class PrimaryZoneController extends Object implements InitializingBean, 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 and Description |
---|
PrimaryZoneController() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
destroy() |
int |
getDelayBetweenChecks() |
String |
getPrimaryZone() |
SecurityConfig |
getSecurityConfig() |
void |
setClusterInfo(ClusterInfo clusterInfo)
Sets the cluster information.
|
void |
setDelayBetweenChecks(int delayBetweenChecks) |
void |
setPrimaryZone(String primaryZone) |
void |
setSecurityConfig(SecurityConfig securityConfig) |
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public String getPrimaryZone()
public void setPrimaryZone(String primaryZone)
public void destroy()
destroy
in interface DisposableBean
public int getDelayBetweenChecks()
public void setDelayBetweenChecks(int delayBetweenChecks)
public void setClusterInfo(ClusterInfo clusterInfo)
ClusterInfoAware
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.
setClusterInfo
in interface ClusterInfoAware
clusterInfo
- The cluster information to be injectedpublic SecurityConfig getSecurityConfig()
public void setSecurityConfig(SecurityConfig securityConfig)
Copyright © GigaSpaces.