GigaSpaces XAP 9.7.2 API

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

java.lang.Object
  extended by org.openspaces.admin.pu.elastic.config.ManualCapacityScaleConfigurer
All Implemented Interfaces:
BeanConfigurer<ManualCapacityScaleConfig>, ScaleStrategyAgentZonesAwareConfigurer, ScaleStrategyCapacityRequirementConfigurer, ScaleStrategyConfigurer<ManualCapacityScaleConfig>

public class ManualCapacityScaleConfigurer
extends Object
implements ScaleStrategyConfigurer<ManualCapacityScaleConfig>, ScaleStrategyCapacityRequirementConfigurer, ScaleStrategyAgentZonesAwareConfigurer

Provides fluent API for creating a new ManualCapacityScaleConfig object. For example new ManualMemoryCapacityScaleStrategyConfigurer().memoryCapacity("1500m").create()

Since:
8.0
Author:
itaif
See Also:
ManualCapacityScaleConfig

Constructor Summary
ManualCapacityScaleConfigurer()
          Provides fluent API for creating a new ManualCapacityScaleConfig object.
 
Method Summary
 ManualCapacityScaleConfigurer allowAboveAverageMemoryPerMachine(boolean allowAboveAverageMemoryPerMachine)
           
 ManualCapacityScaleConfigurer atMostOneConcurrentRelocation(boolean atMostOneConcurrentRelocation)
           
 ManualCapacityScaleConfigurer atMostOneContainerPerMachine()
           
 ManualCapacityScaleConfig create()
          Get the fully configured BeanConfig object (after all properties have been set).
 ManualCapacityScaleConfigurer driveCapacity(String drive, int size, MemoryUnit unit)
          Specifies the disk and network drive capacity.
 ManualCapacityScaleConfigurer driveCapacity(String drive, String size)
          Specifies the disk and network drive capacity.
 ManualCapacityScaleConfigurer enableGridServiceAgentZonesAware()
          By default disabled, which means that the following machines: - Machines started due to failover of another machine
 ManualCapacityScaleConfigurer maxConcurrentRelocationsPerMachine(int maxNumberOfConcurrentRelocationsPerMachine)
           
 ManualCapacityScaleConfigurer memoryCapacity(int memory, MemoryUnit unit)
          Specifies the memory capacity (RAM).
 ManualCapacityScaleConfigurer memoryCapacity(String memory)
          Specifies the memory capacity (RAM).
 ManualCapacityScaleConfigurer numberOfCpuCores(double cpuCores)
          Specifies the number of CPU cores (as reported by the operating system) This includes both real cores and hyper-threaded cores.
 ManualCapacityScaleConfigurer pollingInterval(long pollingInterval, TimeUnit timeUnit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManualCapacityScaleConfigurer

public ManualCapacityScaleConfigurer()
Provides fluent API for creating a new ManualCapacityScaleConfig object. For example new ManualMemoryCapacityScaleStrategyConfigurer().memoryCapacity("1500m").create() The default constructor wraps an empty ManualCapacityScaleConfig object

Method Detail

memoryCapacity

public ManualCapacityScaleConfigurer memoryCapacity(String memory)
Description copied from interface: ScaleStrategyCapacityRequirementConfigurer
Specifies the memory capacity (RAM).

Specified by:
memoryCapacity in interface ScaleStrategyCapacityRequirementConfigurer
Parameters:
memory - - the RAM size as a string (For example :50m" or "50g" or "50t") See also MemoryUnit.getPostfix()

memoryCapacity

public ManualCapacityScaleConfigurer memoryCapacity(int memory,
                                                    MemoryUnit unit)
Description copied from interface: ScaleStrategyCapacityRequirementConfigurer
Specifies the memory capacity (RAM).

Specified by:
memoryCapacity in interface ScaleStrategyCapacityRequirementConfigurer

numberOfCpuCores

public ManualCapacityScaleConfigurer numberOfCpuCores(double cpuCores)
Description copied from interface: ScaleStrategyCapacityRequirementConfigurer
Specifies the number of CPU cores (as reported by the operating system) This includes both real cores and hyper-threaded cores.

Specified by:
numberOfCpuCores in interface ScaleStrategyCapacityRequirementConfigurer

driveCapacity

public ManualCapacityScaleConfigurer driveCapacity(String drive,
                                                   int size,
                                                   MemoryUnit unit)
Description copied from interface: ScaleStrategyCapacityRequirementConfigurer
Specifies the disk and network drive capacity.

Specified by:
driveCapacity in interface ScaleStrategyCapacityRequirementConfigurer
Parameters:
drive - - the file system directory representing the drive
size - - the drive size
unit - - the drive size memory unit. For example: driveCapacity("/",50,MemoryUnit.MEGABYTES) - the drive "/" (on linux) has the size of 50*1024MBs driveCapacity("c:\\",50,MemoryUnit.MEGABYTES) - the drive "c:\" (on windows) has the size of 50*1024MBs

driveCapacity

public ManualCapacityScaleConfigurer driveCapacity(String drive,
                                                   String size)
Description copied from interface: ScaleStrategyCapacityRequirementConfigurer
Specifies the disk and network drive capacity.

Specified by:
driveCapacity in interface ScaleStrategyCapacityRequirementConfigurer
Parameters:
drive - - the file system directory representing the drive
size - - the drive size as a string (For example :50m" or "50g" or "50t") See also MemoryUnit.getPostfix() For example: driveCapacity("/","50m") - the drive "/" (on linux) has the size of 50*1024MBs driveCapacity("c:\\","50m") - the drive "c:\" (on windows) has the size of 50*1024MBs

maxConcurrentRelocationsPerMachine

public ManualCapacityScaleConfigurer maxConcurrentRelocationsPerMachine(int maxNumberOfConcurrentRelocationsPerMachine)
Specified by:
maxConcurrentRelocationsPerMachine in interface ScaleStrategyConfigurer<ManualCapacityScaleConfig>
See Also:
ScaleStrategyConfig.setMaxConcurrentRelocationsPerMachine(int)

atMostOneContainerPerMachine

public ManualCapacityScaleConfigurer atMostOneContainerPerMachine()
Specified by:
atMostOneContainerPerMachine in interface ScaleStrategyConfigurer<ManualCapacityScaleConfig>
See Also:
ScaleStrategyConfig.setAtMostOneContainerPerMachine(boolean)

allowAboveAverageMemoryPerMachine

public ManualCapacityScaleConfigurer allowAboveAverageMemoryPerMachine(boolean allowAboveAverageMemoryPerMachine)
Specified by:
allowAboveAverageMemoryPerMachine in interface ScaleStrategyConfigurer<ManualCapacityScaleConfig>
See Also:
ScaleStrategyConfig.setAllowAboveAverageMemoryPerMachine(boolean)

atMostOneConcurrentRelocation

public ManualCapacityScaleConfigurer atMostOneConcurrentRelocation(boolean atMostOneConcurrentRelocation)
Specified by:
atMostOneConcurrentRelocation in interface ScaleStrategyConfigurer<ManualCapacityScaleConfig>
See Also:
(boolean)

pollingInterval

public ManualCapacityScaleConfigurer pollingInterval(long pollingInterval,
                                                     TimeUnit timeUnit)
Specified by:
pollingInterval in interface ScaleStrategyConfigurer<ManualCapacityScaleConfig>
See Also:
ScaleStrategyConfig.setPollingIntervalSeconds(int)

enableGridServiceAgentZonesAware

public ManualCapacityScaleConfigurer enableGridServiceAgentZonesAware()
Description copied from interface: ScaleStrategyAgentZonesAwareConfigurer
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:
enableGridServiceAgentZonesAware in interface ScaleStrategyAgentZonesAwareConfigurer

create

public ManualCapacityScaleConfig create()
Description copied from interface: BeanConfigurer
Get the fully configured BeanConfig object (after all properties have been set).

Specified by:
create in interface BeanConfigurer<ManualCapacityScaleConfig>
Returns:
a fully configured BeanConfig.

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.