org.openspaces.grid.gsm.machines.plugins
Interface NonBlockingElasticMachineProvisioning
- All Superinterfaces:
- ElasticGridServiceAgentProvisioningProgressEventListenerAware, ElasticMachineProvisioningProgressChangedEventListenerAware, ElasticProcessingUnitMachineIsolationAware
- All Known Implementing Classes:
- DiscoveredMachineProvisioningBean, NonBlockingElasticMachineProvisioningAdapter
public interface NonBlockingElasticMachineProvisioning
- extends ElasticProcessingUnitMachineIsolationAware, ElasticMachineProvisioningProgressChangedEventListenerAware, ElasticGridServiceAgentProvisioningProgressEventListenerAware
An Elastic Service Manager plug-in that enables starting, stopping and discovering of virtual machines.
The plugin must be stateless, and is expected to delegate calls to a remote service (such as a cloud).
Calls to this class are guaranteed to be called from the same thread.
- Since:
- 8.0
- Author:
- itaif
- See Also:
ElasticMachineProvisioning
,
NonBlockingElasticMachineProvisioningAdapter
,
ElasticMachineProvisioningConfig
isStartMachineSupported
boolean isStartMachineSupported()
- Returns:
- true if this object supports starting and stopping of machines.
False indicates that
#startMachinesAsync(CapacityRequirements, long, TimeUnit)
and stopMachineAsync(GridServiceAgent, long, TimeUnit)
raise UnsupportedOperationException - Since:
- 8.0.1
getDiscoveredMachinesAsync
FutureGridServiceAgents getDiscoveredMachinesAsync(long duration,
TimeUnit unit)
- Parameters:
duration
- - the maximum duration after which a TimeoutException is raised.unit
- - the time unit for the duration
- Returns:
- a future array of grid service agents that reside in the data center (or cloud region) defined in
ElasticMachineProvisioningConfig
The caller then filters the result using the criteria defined in ElasticMachineProvisioningConfig.getGridServiceAgentZones()
,
ElasticMachineProvisioningConfig.isGridServiceAgentZoneMandatory()
and ElasticMachineProvisioningConfig.isDedicatedManagementMachines()
so it is not mandatory for the implementation to do so. - Since:
- 8.0.1
getConfig
ElasticMachineProvisioningConfig getConfig()
- Returns:
- the configuration used by this object
- Since:
- 8.0.1
startMachinesAsync
FutureGridServiceAgent[] startMachinesAsync(CapacityRequirements capacityRequirements,
ExactZonesConfig zones,
long duration,
TimeUnit unit)
- Starts a new machine with a new grid service agent with the specified grid service agent zones.
This method is non blocking and returns a future object with the new grid service agent.
- Parameters:
duration
- - the maximum duration after which a TimeoutException is raised.unit
- - the time unit for the duration
- Returns:
- the grid service agent futures
- Throws:
ElasticMachineProvisioningException
InterruptedException
TimeoutException
- Since:
- 9.1.0
stopMachineAsync
FutureStoppedMachine stopMachineAsync(GridServiceAgent agent,
long duration,
TimeUnit unit)
- Shuts down the grid service agent and the machine.
The implementation should be able to close machines that it has not started, but rather an older instance of this object started perhaps with different configuration.
This method is non blocking and is idempotent.
- Parameters:
agent
- duration
- unit
-
- Returns:
-
- Throws:
TimeoutException
InterruptedException
ElasticMachineProvisioningException
- Since:
- 8.0
Copyright © GigaSpaces.