public class AutoScalingSlaUtils extends Object
Constructor and Description |
---|
AutoScalingSlaUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
compare(Comparable<?> threshold,
Object value) |
static String |
formatMetricValue(Object value) |
static CapacityRequirements |
getMaximumCapacity(CapacityRequirements totalMax,
CapacityRequirements maxPerZone,
CapacityRequirementsPerZones enforced,
CapacityRequirementsPerZones newPlanned,
ZonesConfig zones)
Calculates the maximum capacity for the specified zones.
|
static CapacityRequirements |
getMinimumCapacity(CapacityRequirements totalMin,
CapacityRequirements minPerZone,
CapacityRequirementsPerZones enforced,
CapacityRequirementsPerZones newPlanned,
ZonesConfig zones)
Calculates the minimum capacity for the specified zones.
|
static Object |
getStatisticsValue(ProcessingUnit pu,
Map<ProcessingUnitStatisticsId,Object> statistics,
ProcessingUnitStatisticsId ruleStatisticsId)
Validates that the specified statisticsId defined in the rule
|
public static int compare(Comparable<?> threshold, Object value) throws NumberFormatException
NumberFormatException
public static CapacityRequirements getMaximumCapacity(CapacityRequirements totalMax, CapacityRequirements maxPerZone, CapacityRequirementsPerZones enforced, CapacityRequirementsPerZones newPlanned, ZonesConfig zones)
totalMax
- - the maximum capacity when adding up all zonesmaxPerZone
- - the maximum capacity per zoneenforced
- - the last enforced (allocated) capacity per zonenewPlanned
- - the new (planned) capacity per zone (could be zero if no plan yet)zones
- - the zone for which the maximum capacity is requestedzoness
- - the complete list of zonespublic static CapacityRequirements getMinimumCapacity(CapacityRequirements totalMin, CapacityRequirements minPerZone, CapacityRequirementsPerZones enforced, CapacityRequirementsPerZones newPlanned, ZonesConfig zones)
totalMin
- - the minimum capacity when adding up all zonesminPerZone
- - the minimum capacity per zoneenforced
- - the last enforced (allocated) capacity per zonenewPlanned
- - the new (planned) capacity per zone (could be zero if no plan yet, in
that case it is ignored)zones
- - the zone for which the maximum capacity is requestedzoness
- - the complete list of zonespublic static Object getStatisticsValue(ProcessingUnit pu, Map<ProcessingUnitStatisticsId,Object> statistics, ProcessingUnitStatisticsId ruleStatisticsId) throws AutoScalingSlaEnforcementInProgressException
Copyright © GigaSpaces.