GigaSpaces XAP 9.0 API

org.openspaces.admin.pu.elastic.config
Class AutomaticCapacityScaleConfig

java.lang.Object
  extended by org.openspaces.admin.pu.elastic.config.AutomaticCapacityScaleConfig
All Implemented Interfaces:
Externalizable, Serializable, BeanConfig, ScaleStrategyConfig

public class AutomaticCapacityScaleConfig
extends Object
implements ScaleStrategyConfig, Externalizable

Defines an automatic scaling strategy that increases and decreases capacity. The trigger is when a monitored values crosses a threshold

Since:
9.0
Author:
itaif
See Also:
AutomaticCapacityScaleConfigurer, Serialized Form

Constructor Summary
AutomaticCapacityScaleConfig()
          Default constructor
AutomaticCapacityScaleConfig(Map<String,String> properties)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getBeanClassName()
          The Bean implementation class name corresponding to this BeanConfig.
 long getCooldownAfterScaleOutSeconds()
           
 long getCooldownAfterScaleSeconds()
           
 CapacityRequirementsConfig getInitialCapacity()
           
 CapacityRequirementsConfig getMaxCapacity()
           
 int getMaxConcurrentRelocationsPerMachine()
           
 CapacityRequirementsConfig getMinCapacity()
           
 int getPollingIntervalSeconds()
           
 Map<String,String> getProperties()
          Get the String key-value pairs properties used to configure this bean.
 AutomaticCapacityScaleRuleConfig[] getRules()
           
 long getStatisticsPollingIntervalSeconds()
           
 int hashCode()
           
 boolean isAtMostOneContainerPerMachine()
           
 void readExternal(ObjectInput in)
           
 void setAtMostOneContainerPerMachine(boolean atMostOneContainerPerMachine)
          When set to true, at most one Grid Service Container for this Processing Unit is started per machine.
 void setCooldownAfterScaleOutSeconds(long cooldownAfterInstanceAddedSeconds)
          Sets the number of seconds after a ProcessingUnitInstance is added and the ProcessingUnit.getStatus() is DeploymentStatus.INTACT that all scaling rules are disabled.
 void setCooldownAfterScaleSeconds(long cooldownAfterInstanceRemovedSeconds)
          Sets the number of seconds after a ProcessingUnitInstance is removed and the ProcessingUnit.getStatus() is DeploymentStatus.INTACT that all scaling rules are disabled.
 void setInitialCapacity(CapacityRequirementsConfig initialCapacity)
           
 void setMaxCapacity(CapacityRequirementsConfig maxCapacity)
          Sets the maximum scale capacity that the @{link ProcessingUnit is deployed with.
 void setMaxConcurrentRelocationsPerMachine(int maxNumberOfConcurrentRelocationsPerMachine)
          Specifies the number of processing unit instance relocations each machine can handle concurrently.
 void setMinCapacity(CapacityRequirementsConfig minCapacity)
          Sets the minimum scale capacity that the @{link ProcessingUnit is deployed with.
 void setPollingIntervalSeconds(int pollingTimeIntervalSeconds)
          Sets the polling interval in which the scale strategy SLA is monitored and enforced.
 void setProperties(Map<String,String> properties)
          Set with String key-value pairs to configure properties belonging to this bean.
 void setRules(AutomaticCapacityScaleRuleConfig[] rules)
           
 void setStatisticsPollingIntervalSeconds(int statisticsPollingIntervalSeconds)
          Sets the polling rate in which statistics are gathered.
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AutomaticCapacityScaleConfig

public AutomaticCapacityScaleConfig()
Default constructor


AutomaticCapacityScaleConfig

public AutomaticCapacityScaleConfig(Map<String,String> properties)
Method Detail

getProperties

public Map<String,String> getProperties()
Description copied from interface: BeanConfig
Get the String key-value pairs properties used to configure this bean.

Specified by:
getProperties in interface BeanConfig
Returns:
the properties used to configure this bean object.

setProperties

public void setProperties(Map<String,String> properties)
Description copied from interface: BeanConfig
Set with String key-value pairs to configure properties belonging to this bean. Overrides all previously set properties.

Specified by:
setProperties in interface BeanConfig
Parameters:
properties - the properties to configure this bean object.

getBeanClassName

public String getBeanClassName()
Description copied from interface: BeanConfig
The Bean implementation class name corresponding to this BeanConfig.

Specified by:
getBeanClassName in interface BeanConfig
Returns:
the name of the admin Bean implementation class.

getMaxConcurrentRelocationsPerMachine

public int getMaxConcurrentRelocationsPerMachine()
Specified by:
getMaxConcurrentRelocationsPerMachine in interface ScaleStrategyConfig

setMaxConcurrentRelocationsPerMachine

public void setMaxConcurrentRelocationsPerMachine(int maxNumberOfConcurrentRelocationsPerMachine)
Description copied from interface: ScaleStrategyConfig
Specifies the number of processing unit instance relocations each machine can handle concurrently. Relocation requires network and CPU resources, and too many concurrent relocations per machine may degrade its performance temporarily. The data recovery running as part of the relocation uses by default 4 threads. So the total number of threads is 4 multiplied by the specified value. By setting this value higher than 1, processing unit rebalancing completes faster, by using more machine cpu and network resources. Default value is 1. This is an advanced property setting.

Specified by:
setMaxConcurrentRelocationsPerMachine in interface ScaleStrategyConfig

setPollingIntervalSeconds

public void setPollingIntervalSeconds(int pollingTimeIntervalSeconds)
Description copied from interface: ScaleStrategyConfig
Sets the polling interval in which the scale strategy SLA is monitored and enforced.

Specified by:
setPollingIntervalSeconds in interface ScaleStrategyConfig
Parameters:
pollingTimeIntervalSeconds - - the polling interval in seconds

getPollingIntervalSeconds

public int getPollingIntervalSeconds()
Specified by:
getPollingIntervalSeconds in interface ScaleStrategyConfig

isAtMostOneContainerPerMachine

public boolean isAtMostOneContainerPerMachine()
Specified by:
isAtMostOneContainerPerMachine in interface ScaleStrategyConfig

setAtMostOneContainerPerMachine

public void setAtMostOneContainerPerMachine(boolean atMostOneContainerPerMachine)
Description copied from interface: ScaleStrategyConfig
When set to true, at most one Grid Service Container for this Processing Unit is started per machine.

Specified by:
setAtMostOneContainerPerMachine in interface ScaleStrategyConfig

setStatisticsPollingIntervalSeconds

public void setStatisticsPollingIntervalSeconds(int statisticsPollingIntervalSeconds)
Sets the polling rate in which statistics are gathered.


getStatisticsPollingIntervalSeconds

public long getStatisticsPollingIntervalSeconds()

setCooldownAfterScaleOutSeconds

public void setCooldownAfterScaleOutSeconds(long cooldownAfterInstanceAddedSeconds)
Sets the number of seconds after a ProcessingUnitInstance is added and the ProcessingUnit.getStatus() is DeploymentStatus.INTACT that all scaling rules are disabled. Must be equal or bigger than setStatisticsPollingIntervalSeconds(int)


getCooldownAfterScaleOutSeconds

public long getCooldownAfterScaleOutSeconds()

setCooldownAfterScaleSeconds

public void setCooldownAfterScaleSeconds(long cooldownAfterInstanceRemovedSeconds)
Sets the number of seconds after a ProcessingUnitInstance is removed and the ProcessingUnit.getStatus() is DeploymentStatus.INTACT that all scaling rules are disabled. Must be equal or bigger than setStatisticsPollingIntervalSeconds(int)


getCooldownAfterScaleSeconds

public long getCooldownAfterScaleSeconds()

setMinCapacity

public void setMinCapacity(CapacityRequirementsConfig minCapacity)
Sets the minimum scale capacity that the @{link ProcessingUnit is deployed with. The result of a scaling rule result that decreases capacity will never breach the minimum scale capacity.


getMinCapacity

public CapacityRequirementsConfig getMinCapacity()

setMaxCapacity

public void setMaxCapacity(CapacityRequirementsConfig maxCapacity)
Sets the maximum scale capacity that the @{link ProcessingUnit is deployed with. The result of a scaling rule result that increases capacity will never breach the maximum scale capacity.


setRules

public void setRules(AutomaticCapacityScaleRuleConfig[] rules)

getRules

public AutomaticCapacityScaleRuleConfig[] getRules()

getMaxCapacity

public CapacityRequirementsConfig getMaxCapacity()

setInitialCapacity

public void setInitialCapacity(CapacityRequirementsConfig initialCapacity)

getInitialCapacity

public CapacityRequirementsConfig getInitialCapacity()

toString

public String toString()
Specified by:
toString in interface ScaleStrategyConfig
Overrides:
toString in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface ScaleStrategyConfig
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Specified by:
equals in interface ScaleStrategyConfig
Overrides:
equals in class Object

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

GigaSpaces XAP 9.0 API

Copyright © GigaSpaces.