GigaSpaces XAP 10.0.1 API

org.openspaces.grid.gsm.strategy
Class AutomaticCapacityScaleStrategyBean

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

public class AutomaticCapacityScaleStrategyBean
extends AbstractCapacityScaleStrategyBean
implements AutoScalingSlaEnforcementEndpointAware

+ * The business logic that scales an elastic processing unit based on the specified + * AutomaticCapacityScaleConfig + * + * @author itaif + * @since 9.0.0 +


Constructor Summary
AutomaticCapacityScaleStrategyBean()
           
 
Method Summary
 void afterPropertiesSet()
          Invoked by a bean factory after it has set all bean properties.
 void destroy()
          Invoked by a bean factory on destruction of a singleton.
protected  void enforceSla()
           
 ScaleStrategyConfig getConfig()
           
protected  void recoverStateOnEsmStart()
           
 void setAutoScalingSlaEnforcementEndpoint(AutoScalingSlaEnforcementEndpoint endpoint)
           
protected  boolean setPlannedCapacity(CapacityRequirementsPerZonesConfig config)
          Call once in order to modify the behavior of AbstractCapacityScaleStrategyBean.enforcePlannedCapacity()
 
Methods inherited from class org.openspaces.grid.gsm.strategy.AbstractCapacityScaleStrategyBean
calcRoundedTotalMemoryInMB, enforcePlannedCapacity, getAllocatedCapacity, getDefaultZones, getGridServiceContainerConfig, getPlannedCapacity, getPlannedZones, getRecoveredStateOnEsmStart, isGridServiceAgentZonesAware, isUndeploying, setAgentFailureDetectionConfig, setContainersSlaEnforcementEndpoint, setGridServiceContainerConfig, setMachinesSlaEnforcementEndpoint, setPlannedCapacity, setPlannedCapacity, setRebalancingSlaEnforcementEndpoint, setScaleStrategyConfig
 
Methods inherited from class org.openspaces.grid.gsm.strategy.AbstractScaleStrategyBean
agentProvisioningCompletedEvent, agentProvisioningInProgressEvent, capacityPlanningCompletedEvent, capacityPlanningCompletedEvent, capacityPlanningInProgressEvent, capacityPlanningInProgressEvent, containerProvisioningCompletedEvent, containerProvisioningInProgressEvent, 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

AutomaticCapacityScaleStrategyBean

public AutomaticCapacityScaleStrategyBean()
Method Detail

setAutoScalingSlaEnforcementEndpoint

public void setAutoScalingSlaEnforcementEndpoint(AutoScalingSlaEnforcementEndpoint endpoint)
Specified by:
setAutoScalingSlaEnforcementEndpoint in interface AutoScalingSlaEnforcementEndpointAware

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 AbstractCapacityScaleStrategyBean
See Also:
BeanConfigurationException, BeanInitializationException

destroy

public void destroy()
Description copied from interface: Bean
Invoked by a bean factory on destruction of a singleton.

Specified by:
destroy in interface Bean
Overrides:
destroy in class AbstractScaleStrategyBean
See Also:
BeanConfigException

getConfig

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

recoverStateOnEsmStart

protected void recoverStateOnEsmStart()
                               throws SomeProcessingUnitsHaveNotCompletedStateRecoveryException,
                                      NeedToWaitUntilAllGridServiceAgentsDiscoveredException,
                                      MachinesSlaEnforcementInProgressException,
                                      UndeployInProgressException
Overrides:
recoverStateOnEsmStart in class AbstractCapacityScaleStrategyBean
Throws:
SomeProcessingUnitsHaveNotCompletedStateRecoveryException
NeedToWaitUntilAllGridServiceAgentsDiscoveredException
MachinesSlaEnforcementInProgressException
UndeployInProgressException

setPlannedCapacity

protected boolean setPlannedCapacity(CapacityRequirementsPerZonesConfig config)
Description copied from class: AbstractCapacityScaleStrategyBean
Call once in order to modify the behavior of AbstractCapacityScaleStrategyBean.enforcePlannedCapacity()

Overrides:
setPlannedCapacity in class AbstractCapacityScaleStrategyBean
Returns:
false if planned has not changed, true if plan changed

enforceSla

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

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.