GigaSpaces XAP 10.0.1 API

org.openspaces.grid.gsm.strategy
Class EagerScaleStrategyBean

java.lang.Object
  extended by org.openspaces.grid.gsm.strategy.AbstractScaleStrategyBean
      extended by org.openspaces.grid.gsm.strategy.EagerScaleStrategyBean
All Implemented Interfaces:
Runnable, Bean, ContainersSlaEnforcementEndpointAware, ElasticMachineProvisioningAware, GridServiceContainerConfigAware, MachinesStateBackupAware, ElasticProcessingUnitMachineIsolationAware, MachinesSlaEnforcementEndpointAware, ProcessingUnitAware, RebalancingSlaEnforcementEndpointAware, ElasticScaleStrategyEventStorageAware, ScaleStrategyBean

public class EagerScaleStrategyBean
extends AbstractScaleStrategyBean
implements RebalancingSlaEnforcementEndpointAware, ContainersSlaEnforcementEndpointAware, MachinesSlaEnforcementEndpointAware, GridServiceContainerConfigAware

The business logic that scales an elastic processing unit based on the specified EagerScaleConfig

Since:
8.0
Author:
itaif

Constructor Summary
EagerScaleStrategyBean()
           
 
Method Summary
 void afterPropertiesSet()
          Invoked by a bean factory after it has set all bean properties.
 void enforceSla()
           
 EagerScaleConfig getConfig()
           
protected  MachinesSlaEnforcementState.RecoveryState getRecoveredStateOnEsmStart(ProcessingUnit otherPu)
           
protected  boolean isUndeploying()
           
protected  void recoverStateOnEsmStart()
           
 void setContainersSlaEnforcementEndpoint(ContainersSlaEnforcementEndpoint containersService)
           
 void setGridServiceContainerConfig(org.openspaces.admin.internal.pu.elastic.GridServiceContainerConfig containersConfig)
           
 void setMachinesSlaEnforcementEndpoint(MachinesSlaEnforcementEndpoint endpoint)
           
 void setRebalancingSlaEnforcementEndpoint(RebalancingSlaEnforcementEndpoint relocationService)
           
 
Methods inherited from class org.openspaces.grid.gsm.strategy.AbstractScaleStrategyBean
agentProvisioningCompletedEvent, agentProvisioningInProgressEvent, capacityPlanningCompletedEvent, capacityPlanningCompletedEvent, capacityPlanningInProgressEvent, capacityPlanningInProgressEvent, containerProvisioningCompletedEvent, containerProvisioningInProgressEvent, destroy, getAdmin, getContainerNumberOfCpuCores, getDiscoveredMachinesCache, getElasticMachineProvisioningOrNull, getIsolation, getLogger, getMachineProvisioning, getMaximumNumberOfInstances, getMinimumNumberOfMachines, getPollingIntervalSeconds, getProcessingUnit, getProperties, getRemoteApi, getSchemaConfig, isScaleInProgress, machineProvisioningCompletedEvent, machineProvisioningInProgressEvent, puInstanceProvisioningCompletedEvent, puInstanceProvisioningInProgressEvent, run, setAdmin, setElasticMachineProvisioning, setElasticProcessingUnitMachineIsolation, setElasticScaleStrategyEventStorage, setMachineDiscoveryQuiteMode, setMachinesStateBackup, setProcessingUnit, setProcessingUnitSchema, setProperties, validateAllProcessingUnitsRecoveredStateOnEsmStart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EagerScaleStrategyBean

public EagerScaleStrategyBean()
Method Detail

setMachinesSlaEnforcementEndpoint

public void setMachinesSlaEnforcementEndpoint(MachinesSlaEnforcementEndpoint endpoint)
Specified by:
setMachinesSlaEnforcementEndpoint in interface MachinesSlaEnforcementEndpointAware

setContainersSlaEnforcementEndpoint

public void setContainersSlaEnforcementEndpoint(ContainersSlaEnforcementEndpoint containersService)
Specified by:
setContainersSlaEnforcementEndpoint in interface ContainersSlaEnforcementEndpointAware

setRebalancingSlaEnforcementEndpoint

public void setRebalancingSlaEnforcementEndpoint(RebalancingSlaEnforcementEndpoint relocationService)
Specified by:
setRebalancingSlaEnforcementEndpoint in interface RebalancingSlaEnforcementEndpointAware

setGridServiceContainerConfig

public void setGridServiceContainerConfig(org.openspaces.admin.internal.pu.elastic.GridServiceContainerConfig containersConfig)
Specified by:
setGridServiceContainerConfig in interface GridServiceContainerConfigAware

afterPropertiesSet

public void afterPropertiesSet()
Description copied from interface: Bean
Invoked by a bean factory after it has set all bean properties. This method allows the bean instance to perform non-blocking initialization, which is only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.

Specified by:
afterPropertiesSet in interface Bean
Overrides:
afterPropertiesSet in class AbstractScaleStrategyBean
See Also:
BeanConfigurationException, BeanInitializationException

enforceSla

public void enforceSla()
                throws SlaEnforcementInProgressException
Specified by:
enforceSla in class AbstractScaleStrategyBean
Throws:
SlaEnforcementInProgressException

getConfig

public EagerScaleConfig getConfig()
Specified by:
getConfig in interface ScaleStrategyBean

isUndeploying

protected boolean isUndeploying()
Specified by:
isUndeploying in class AbstractScaleStrategyBean
Returns:
true if this is an undeployment strategy (pu is undeploying)

recoverStateOnEsmStart

protected void recoverStateOnEsmStart()
                               throws MachinesSlaEnforcementInProgressException,
                                      SomeProcessingUnitsHaveNotCompletedStateRecoveryException,
                                      NeedToWaitUntilAllGridServiceAgentsDiscoveredException,
                                      UndeployInProgressException
Specified by:
recoverStateOnEsmStart in class AbstractScaleStrategyBean
Throws:
MachinesSlaEnforcementInProgressException
SomeProcessingUnitsHaveNotCompletedStateRecoveryException
NeedToWaitUntilAllGridServiceAgentsDiscoveredException
UndeployInProgressException

getRecoveredStateOnEsmStart

protected MachinesSlaEnforcementState.RecoveryState getRecoveredStateOnEsmStart(ProcessingUnit otherPu)
Specified by:
getRecoveredStateOnEsmStart in class AbstractScaleStrategyBean

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.