GigaSpaces XAP 9.7.2 API

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

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

public class ManualCapacityScaleConfig
extends Object
implements ScaleStrategyConfig, ScaleStrategyCapacityRequirementConfig, ScaleStrategyAgentZonesAwareConfig, Externalizable

Defines a manual scaling strategy that consumes the specified memory capacity. When enabled the processing unit scales out whenever the specified memory capacity deviates from the actual memory capacity. When a backup partition is enabled (which usually is the case), the specified memory capacity is the total memory occupied by the primary partition instances and the backup partition instances.

Since:
8.0
Author:
itaif
See Also:
ManualCapacityScaleConfigurer, Serialized Form

Constructor Summary
ManualCapacityScaleConfig()
          Default constructor
ManualCapacityScaleConfig(Map<String,String> properties)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getBeanClassName()
          The Bean implementation class name corresponding to this BeanConfig.
 Map<String,Long> getDrivesCapacityInMB()
           
 int getMaxConcurrentRelocationsPerMachine()
           
 long getMemoryCapacityInMB()
           
 double getNumberOfCpuCores()
           
 int getPollingIntervalSeconds()
           
 Map<String,String> getProperties()
          Get the String key-value pairs properties used to configure this bean.
 int hashCode()
           
 boolean isAllowAboveAverageMemoryPerMachine()
           
 boolean isAtMostOneConcurrentRelocation()
           
 boolean isAtMostOneContainerPerMachine()
           
 boolean isAtMostOneContainersPerMachine()
          Deprecated. 
 boolean isGridServiceAgentZonesAware()
           
 void readExternal(ObjectInput in)
           
 void setAllowAboveAverageMemoryPerMachine(boolean allowAboveAverageMemoryPerMachine)
          Allows a single machine to accommodate for more than the average maximum memory allocation of a Processing Unit.
 void setAtMostOneConcurrentRelocation(boolean atMostOneConcurrentRelocation)
          Limits the number of concurrent relocations for the entire cluster to 1.
 void setAtMostOneContainerPerMachine(boolean atMostOneContainerPerMachine)
          When set to true, at most one Grid Service Container for this Processing Unit is started per machine.
 void setDrivesCapacityInMB(Map<String,Long> megaBytesPerDrive)
          Specifies the disk and network drive capacity.
 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 setMemoryCapacityInMB(long memory)
          Specifies the total memory capacity.
 void setNumberOfCpuCores(double cpuCores)
          Specifies the total CPU cores.
 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.
 CapacityRequirements toCapacityRequirements()
           
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ManualCapacityScaleConfig

public ManualCapacityScaleConfig()
Default constructor


ManualCapacityScaleConfig

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

setAtMostOneConcurrentRelocation

public void setAtMostOneConcurrentRelocation(boolean atMostOneConcurrentRelocation)
Description copied from interface: ScaleStrategyConfig
Limits the number of concurrent relocations for the entire cluster to 1. Notice this is an aggregated property across all machines.

Specified by:
setAtMostOneConcurrentRelocation in interface ScaleStrategyConfig
See Also:
ScaleStrategyConfig.setMaxConcurrentRelocationsPerMachine(int)

isAtMostOneConcurrentRelocation

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

setMemoryCapacityInMB

public void setMemoryCapacityInMB(long memory)
Description copied from interface: ScaleStrategyCapacityRequirementConfig
Specifies the total memory capacity.

Specified by:
setMemoryCapacityInMB in interface ScaleStrategyCapacityRequirementConfig

getMemoryCapacityInMB

public long getMemoryCapacityInMB()
                           throws NumberFormatException
Specified by:
getMemoryCapacityInMB in interface ScaleStrategyCapacityRequirementConfig
Throws:
NumberFormatException

setNumberOfCpuCores

public void setNumberOfCpuCores(double cpuCores)
Description copied from interface: ScaleStrategyCapacityRequirementConfig
Specifies the total CPU cores.

Specified by:
setNumberOfCpuCores in interface ScaleStrategyCapacityRequirementConfig

getNumberOfCpuCores

public double getNumberOfCpuCores()
Specified by:
getNumberOfCpuCores in interface ScaleStrategyCapacityRequirementConfig

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

isAtMostOneContainersPerMachine

@Deprecated
public boolean isAtMostOneContainersPerMachine()
Deprecated. 


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

setAllowAboveAverageMemoryPerMachine

public void setAllowAboveAverageMemoryPerMachine(boolean allowAboveAverageMemoryPerMachine)
Description copied from interface: ScaleStrategyConfig
Allows a single machine to accommodate for more than the average maximum memory allocation of a Processing Unit. The average is calculated like so : (memoryCapacityPerContainer * totalNumberOfProcessingUnitInstances) / minimumNumberOfMachines

Specified by:
setAllowAboveAverageMemoryPerMachine in interface ScaleStrategyConfig

isAllowAboveAverageMemoryPerMachine

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

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.

toString

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

setDrivesCapacityInMB

public void setDrivesCapacityInMB(Map<String,Long> megaBytesPerDrive)
Description copied from interface: ScaleStrategyCapacityRequirementConfig
Specifies the disk and network drive capacity.

Specified by:
setDrivesCapacityInMB in interface ScaleStrategyCapacityRequirementConfig
Parameters:
megaBytesPerDrive - - a mapping between the file system directory representing the drive and its capacity (in mega-bytes) needed by the pu . For example the drive "/" (on linux) has the size of 50*1024MBs or the drive "c:\" (on windows) has the size of 50*1024MBs

getDrivesCapacityInMB

public Map<String,Long> getDrivesCapacityInMB()
                                       throws NumberFormatException
Specified by:
getDrivesCapacityInMB in interface ScaleStrategyCapacityRequirementConfig
Throws:
NumberFormatException

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

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

toCapacityRequirements

public CapacityRequirements toCapacityRequirements()
Specified by:
toCapacityRequirements in interface ScaleStrategyCapacityRequirementConfig

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.