GigaSpaces XAP 9.7.2 API

org.openspaces.grid.gsm.machines.plugins
Interface NonBlockingElasticMachineProvisioning

All Superinterfaces:
ElasticGridServiceAgentProvisioningProgressEventListenerAware, ElasticMachineProvisioningProgressChangedEventListenerAware, ElasticMachineProvisioningSpaceAware, ElasticProcessingUnitMachineIsolationAware
All Known Implementing Classes:
DiscoveredMachineProvisioningBean, NonBlockingElasticMachineProvisioningAdapter

public interface NonBlockingElasticMachineProvisioning
extends ElasticProcessingUnitMachineIsolationAware, ElasticMachineProvisioningSpaceAware, 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

Method Summary
 FutureCleanupCloudResources cleanupCloudResources(long duration, TimeUnit unit)
          Cleanup all cloud resources.
 ElasticMachineProvisioningConfig getConfig()
           
 FutureGridServiceAgents getDiscoveredMachinesAsync(long duration, TimeUnit unit)
           
 boolean isStartMachineSupported()
           
 FutureMachineFailure[] onMachinesFailureAsync(FailedGridServiceAgent[] failedAgents, long duration, TimeUnit unit)
          Perform the required actions following an unexpected machine failure.
 FutureGridServiceAgent[] startMachinesAsync(CapacityRequirements capacityRequirements, ExactZonesConfig zones, FailedGridServiceAgent[] failedAgents, long duration, TimeUnit unit)
          Starts a new machine with a new grid service agent with the specified grid service agent zones.
 FutureStoppedMachine stopMachineAsync(GridServiceAgent agent, long duration, TimeUnit unit)
          Shuts down the grid service agent and the machine.
 
Methods inherited from interface org.openspaces.grid.gsm.machines.isolation.ElasticProcessingUnitMachineIsolationAware
setElasticProcessingUnitMachineIsolation
 
Methods inherited from interface org.openspaces.grid.gsm.machines.plugins.space.ElasticMachineProvisioningSpaceAware
setElasticMachineProvisioningSpace
 
Methods inherited from interface org.openspaces.grid.gsm.machines.plugins.events.ElasticMachineProvisioningProgressChangedEventListenerAware
setElasticMachineProvisioningProgressChangedEventListener
 
Methods inherited from interface org.openspaces.grid.gsm.machines.plugins.events.ElasticGridServiceAgentProvisioningProgressEventListenerAware
setElasticGridServiceAgentProvisioningProgressEventListener
 

Method Detail

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,
                                            FailedGridServiceAgent[] failedAgents,
                                            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:
capacityRequirements - - total capacity of new machines
zones - - the agent zones.
duration - - the maximum duration after which a TimeoutException is raised.
unit - - the time unit for the duration.
failedAgents - - list of agents that require recovery
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

cleanupCloudResources

FutureCleanupCloudResources cleanupCloudResources(long duration,
                                                  TimeUnit unit)
Cleanup all cloud resources. This method is called once after the processing unit has undeployed and all machines have been stopped.

Since:
9.7.0

onMachinesFailureAsync

FutureMachineFailure[] onMachinesFailureAsync(FailedGridServiceAgent[] failedAgents,
                                              long duration,
                                              TimeUnit unit)
Perform the required actions following an unexpected machine failure. E.g. handle machine related resources (e.g. floating IPs, attached storage). This method is called once during failover, just before starting a new machine. The method is non blocking and returns an array of future objects, one for each failed machine that was handled.

Parameters:
failedAgents - - list of agents that require recovery
Returns:
an array of future objects, one for each failed machine that was handled
Throws:
ElasticMachineProvisioningException
Since:
9.7.1

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.