GigaSpaces XAP 10.0.1 API

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

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

public class ManualCapacityPerZonesScaleConfig
extends Object
implements ScaleStrategyConfig, ScaleStrategyAgentZonesAwareConfig, Externalizable

Since:
9.1.0
Author:
Itai Frenkel
See Also:
Serialized Form

Constructor Summary
ManualCapacityPerZonesScaleConfig()
           
ManualCapacityPerZonesScaleConfig(Map<String,String> properties)
           
 
Method Summary
 void addCapacity(ExactZonesConfig zones, CapacityRequirementsConfig capacity)
           
 boolean equals(Object obj)
           
 String getBeanClassName()
          The Bean implementation class name corresponding to this BeanConfig.
 CapacityRequirementsPerZonesConfig getCapacityRequirementsPerZonesConfig()
           
 int getMaxConcurrentRelocationsPerMachine()
           
 int getPollingIntervalSeconds()
           
 Map<String,String> getProperties()
          Get the String key-value pairs properties used to configure this bean.
 int hashCode()
           
 boolean isAtMostOneContainerPerMachine()
           
 boolean isGridServiceAgentZonesAware()
           
 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 setGridServiceAgentZonesAware(boolean enableAgentZonesAware)
          By default disabled, which means that the following machines: - Machines started due to failover of another machine
 void setMaxConcurrentRelocationsPerMachine(int maxNumberOfConcurrentRelocationsPerMachine)
          Specifies the number of processing unit instance relocations each machine can handle concurrently.
 void setPollingIntervalSeconds(int seconds)
          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 writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openspaces.admin.pu.elastic.config.ScaleStrategyConfig
toString
 

Constructor Detail

ManualCapacityPerZonesScaleConfig

public ManualCapacityPerZonesScaleConfig()

ManualCapacityPerZonesScaleConfig

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

addCapacity

public void addCapacity(ExactZonesConfig zones,
                        CapacityRequirementsConfig capacity)
Parameters:
zone - - the location (expressed as a GridServiceAgent zone) in which the capacity is allocated
capacityRequirements - - the capacity to allocate

setPollingIntervalSeconds

public void setPollingIntervalSeconds(int seconds)
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:
seconds - - the polling interval in seconds

getPollingIntervalSeconds

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

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

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

isGridServiceAgentZonesAware

public boolean isGridServiceAgentZonesAware()
Specified by:
isGridServiceAgentZonesAware in interface ScaleStrategyAgentZonesAwareConfig

setGridServiceAgentZonesAware

public void setGridServiceAgentZonesAware(boolean enableAgentZonesAware)
Description copied from interface: ScaleStrategyAgentZonesAwareConfig
By default disabled, which means that the following machines: - Machines started due to failover of another machine. - Machines started by AutomaticCapacityScaleRuleConfig sue to threshold breach are started with a Grid Service Agent zones as described in #getGridServiceAgentZones() When enabled, these machines are started with the same ExactZonesConfig as the failed machine, or the same ExactZonesConfig as the machines whose threshold was breached.

Specified by:
setGridServiceAgentZonesAware in interface ScaleStrategyAgentZonesAwareConfig

getCapacityRequirementsPerZonesConfig

public CapacityRequirementsPerZonesConfig getCapacityRequirementsPerZonesConfig()

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.

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.

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.

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

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

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.