public class ManualCapacityScaleConfig extends Object implements ScaleStrategyConfig, ScaleStrategyCapacityRequirementConfig, ScaleStrategyAgentZonesAwareConfig, Externalizable
ManualCapacityScaleConfigurer
,
Serialized FormConstructor and Description |
---|
ManualCapacityScaleConfig()
Default constructor
|
ManualCapacityScaleConfig(Map<String,String> properties) |
Modifier and Type | Method and Description |
---|---|
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) |
public void setAtMostOneConcurrentRelocation(boolean atMostOneConcurrentRelocation)
ScaleStrategyConfig
setAtMostOneConcurrentRelocation
in interface ScaleStrategyConfig
ScaleStrategyConfig.setMaxConcurrentRelocationsPerMachine(int)
public boolean isAtMostOneConcurrentRelocation()
isAtMostOneConcurrentRelocation
in interface ScaleStrategyConfig
public void setMemoryCapacityInMB(long memory)
ScaleStrategyCapacityRequirementConfig
setMemoryCapacityInMB
in interface ScaleStrategyCapacityRequirementConfig
public long getMemoryCapacityInMB() throws NumberFormatException
getMemoryCapacityInMB
in interface ScaleStrategyCapacityRequirementConfig
NumberFormatException
public void setNumberOfCpuCores(double cpuCores)
ScaleStrategyCapacityRequirementConfig
setNumberOfCpuCores
in interface ScaleStrategyCapacityRequirementConfig
public double getNumberOfCpuCores()
getNumberOfCpuCores
in interface ScaleStrategyCapacityRequirementConfig
public void setPollingIntervalSeconds(int seconds)
ScaleStrategyConfig
setPollingIntervalSeconds
in interface ScaleStrategyConfig
seconds
- - the polling interval in secondspublic int getPollingIntervalSeconds()
getPollingIntervalSeconds
in interface ScaleStrategyConfig
public int getMaxConcurrentRelocationsPerMachine()
getMaxConcurrentRelocationsPerMachine
in interface ScaleStrategyConfig
public void setMaxConcurrentRelocationsPerMachine(int maxNumberOfConcurrentRelocationsPerMachine)
ScaleStrategyConfig
setMaxConcurrentRelocationsPerMachine
in interface ScaleStrategyConfig
@Deprecated public boolean isAtMostOneContainersPerMachine()
public boolean isAtMostOneContainerPerMachine()
isAtMostOneContainerPerMachine
in interface ScaleStrategyConfig
public void setAtMostOneContainerPerMachine(boolean atMostOneContainerPerMachine)
ScaleStrategyConfig
setAtMostOneContainerPerMachine
in interface ScaleStrategyConfig
public void setAllowAboveAverageMemoryPerMachine(boolean allowAboveAverageMemoryPerMachine)
ScaleStrategyConfig
setAllowAboveAverageMemoryPerMachine
in interface ScaleStrategyConfig
public boolean isAllowAboveAverageMemoryPerMachine()
isAllowAboveAverageMemoryPerMachine
in interface ScaleStrategyConfig
public Map<String,String> getProperties()
BeanConfig
getProperties
in interface BeanConfig
public void setProperties(Map<String,String> properties)
BeanConfig
setProperties
in interface BeanConfig
properties
- the properties to configure this bean object.public String getBeanClassName()
BeanConfig
Bean
implementation class name corresponding to this BeanConfig.getBeanClassName
in interface BeanConfig
public String toString()
toString
in interface ScaleStrategyConfig
toString
in class Object
public void setDrivesCapacityInMB(Map<String,Long> megaBytesPerDrive)
ScaleStrategyCapacityRequirementConfig
setDrivesCapacityInMB
in interface ScaleStrategyCapacityRequirementConfig
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*1024MBspublic Map<String,Long> getDrivesCapacityInMB() throws NumberFormatException
getDrivesCapacityInMB
in interface ScaleStrategyCapacityRequirementConfig
NumberFormatException
public boolean isGridServiceAgentZonesAware()
isGridServiceAgentZonesAware
in interface ScaleStrategyAgentZonesAwareConfig
public void setGridServiceAgentZonesAware(boolean enableAgentZonesAware)
ScaleStrategyAgentZonesAwareConfig
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.setGridServiceAgentZonesAware
in interface ScaleStrategyAgentZonesAwareConfig
public int hashCode()
hashCode
in interface ScaleStrategyConfig
hashCode
in class Object
public boolean equals(Object obj)
equals
in interface ScaleStrategyConfig
equals
in class Object
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public CapacityRequirements toCapacityRequirements()
toCapacityRequirements
in interface ScaleStrategyCapacityRequirementConfig
Copyright © GigaSpaces.