public class StandardPrioritizedRemoteCloudAdapter extends Object implements PrioritizedRemoteCloudAdapter
CloudAdapter that acts as a local proxy to a remotely located
CloudAdapter.
The remote CloudAdapter is assumed to publish a REST API as described
in the documentation for the CloudAdapterRestApi.
The class is thread-safe by virtue of relying on thread-safe components and
can be used without explicit client-side locking.| Constructor and Description |
|---|
StandardPrioritizedRemoteCloudAdapter()
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(PrioritizedRemoteCloudAdapter o)
Compares the priorities of the prioritized cloud adapters so that higher
priorities are sorted first, i.e., descending order is the most natural
for these adapters.
|
void |
configure(PrioritizedRemoteCloudAdapterConfig configuration)
Configures this remote cloud adapter proxy with the given values.
|
MachinePool |
getMachinePool()
Returns the remote cloud adapter's machine pool.
|
int |
getPriority() |
void |
resizeMachinePool(long desiredCapacity)
Tells the remote cloud adapter to resize the machine pool it manages.
|
static void |
validate(PrioritizedRemoteCloudAdapterConfig configuration)
Validates the configuration.
|
public StandardPrioritizedRemoteCloudAdapter()
public static void validate(PrioritizedRemoteCloudAdapterConfig configuration) throws ConfigurationException
configuration - The configuration to validate.ConfigurationException - Thrown if the configuration cannot be validated, i.e., there
is something wrong with it (missing or unacceptable value).public void configure(PrioritizedRemoteCloudAdapterConfig configuration) throws ConfigurationException
PrioritizedRemoteCloudAdapterconfigure in interface PrioritizedRemoteCloudAdapterconfiguration - The configuration required to connect to the remote cloud
adapter.ConfigurationException - Thrown if the configuration cannot be validated, i.e., there
is something wrong with it (missing or unacceptable value).public int getPriority()
getPriority in interface PrioritizedRemoteCloudAdapterpublic MachinePool getMachinePool() throws CloudAdapterException
PrioritizedRemoteCloudAdaptergetMachinePool in interface PrioritizedRemoteCloudAdapterCloudAdapterExceptionpublic void resizeMachinePool(long desiredCapacity)
throws IllegalArgumentException,
CloudAdapterException
PrioritizedRemoteCloudAdapterresizeMachinePool in interface PrioritizedRemoteCloudAdapterIllegalArgumentExceptionCloudAdapterExceptionpublic int compareTo(PrioritizedRemoteCloudAdapter o)
compareTo in interface PrioritizedRemoteCloudAdaptercompareTo in interface Comparable<PrioritizedRemoteCloudAdapter>Copyright © 2011–2014 elastisys. All rights reserved.