GigaSpaces XAP 9.0 API

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

All Superinterfaces:
ElasticProcessingUnitMachineIsolationAware
All Known Implementing Classes:
DiscoveredMachineProvisioningBean, NonBlockingElasticMachineProvisioningAdapter

public interface NonBlockingElasticMachineProvisioning
extends ElasticProcessingUnitMachineIsolationAware

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
 ElasticMachineProvisioningConfig getConfig()
           
 FutureGridServiceAgents getDiscoveredMachinesAsync(long duration, TimeUnit unit)
           
 boolean isStartMachineSupported()
           
 FutureGridServiceAgent[] startMachinesAsync(CapacityRequirements capacityRequirements, long duration, TimeUnit unit)
          Starts a new machine with a new grid service agent with the specified zone.
 void 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
 

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,
                                            long duration,
                                            TimeUnit unit)
Starts a new machine with a new grid service agent with the specified zone. All started machines must have Grid Service Agents with zones as defined by ElasticMachineProvisioningConfig.getGridServiceAgentZones() and ElasticMachineProvisioningConfig.isGridServiceAgentZoneMandatory() 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:
8.0

stopMachineAsync

void 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 -
Throws:
TimeoutException
InterruptedException
ElasticMachineProvisioningException
Since:
8.0

GigaSpaces XAP 9.0 API

Copyright © GigaSpaces.