public enum StrictPoolSizeCalculationStrategy extends Enum<StrictPoolSizeCalculationStrategy> implements PoolSizeCalculationStrategy
PoolSizeCalculationStrategy that ignores current machine pools and
the statuses of the machines therein, and merely strictly enforces the
fractions as given by the priorities and configuration order of the cloud
adapters.
This class is a thread-safe singleton. The singleton instance only provides only a function of its inputs.
| Enum Constant and Description |
|---|
INSTANCE
The only instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
Map<PrioritizedCloudAdapter,Integer> |
calculatePoolSizes(Collection<PrioritizedCloudAdapter> backendCloudAdapters,
int desiredTotalSize)
Calculates the desired sizes to set for a collection of back-end cloud
adapters given their individual priorities and a total desired pool size.
|
static StrictPoolSizeCalculationStrategy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StrictPoolSizeCalculationStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StrictPoolSizeCalculationStrategy INSTANCE
public static StrictPoolSizeCalculationStrategy[] values()
for (StrictPoolSizeCalculationStrategy c : StrictPoolSizeCalculationStrategy.values()) System.out.println(c);
public static StrictPoolSizeCalculationStrategy valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic Map<PrioritizedCloudAdapter,Integer> calculatePoolSizes(Collection<PrioritizedCloudAdapter> backendCloudAdapters, int desiredTotalSize) throws CloudAdapterException
PoolSizeCalculationStrategycalculatePoolSizes in interface PoolSizeCalculationStrategybackendCloudAdapters - The cloud adapters, in the order in which they were
configured, should that matter to the calculation.desiredTotalSize - The desired total pool size.CloudAdapterExceptionCopyright © 2011–2015 elastisys. All rights reserved.