public class NonBlockingElasticMachineProvisioningAdapter extends Object implements NonBlockingElasticMachineProvisioning
ElasticMachineProvisioning
and exposes a NonBlockingElasticMachineProvisioning
NonBlockingElasticMachineProvisioning
,
ElasticMachineProvisioning
Constructor and Description |
---|
NonBlockingElasticMachineProvisioningAdapter(ElasticMachineProvisioning machineProvisioning,
ExecutorService executorService,
ScheduledThreadPoolExecutor scheduledExecutorService) |
public NonBlockingElasticMachineProvisioningAdapter(ElasticMachineProvisioning machineProvisioning, ExecutorService executorService, ScheduledThreadPoolExecutor scheduledExecutorService)
public FutureGridServiceAgent[] startMachinesAsync(CapacityRequirements capacityRequirements, ExactZonesConfig zones, FailedGridServiceAgent[] failedAgents, long duration, TimeUnit unit)
NonBlockingElasticMachineProvisioning
startMachinesAsync
in interface NonBlockingElasticMachineProvisioning
capacityRequirements
- - total capacity of new machineszones
- - the agent zones.failedAgents
- - list of agents that require recoveryduration
- - the maximum duration after which a TimeoutException is raised.unit
- - the time unit for the duration.public FutureStoppedMachine stopMachineAsync(GridServiceAgent agent, long duration, TimeUnit unit)
NonBlockingElasticMachineProvisioning
stopMachineAsync
in interface NonBlockingElasticMachineProvisioning
public FutureGridServiceAgents getDiscoveredMachinesAsync(long duration, TimeUnit unit)
getDiscoveredMachinesAsync
in interface NonBlockingElasticMachineProvisioning
duration
- - the maximum duration after which a TimeoutException is raised.unit
- - the time unit for the durationElasticMachineProvisioningConfig
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.public ElasticMachineProvisioningConfig getConfig()
getConfig
in interface NonBlockingElasticMachineProvisioning
public boolean isStartMachineSupported()
isStartMachineSupported
in interface NonBlockingElasticMachineProvisioning
#startMachinesAsync(CapacityRequirements, long, TimeUnit)
and NonBlockingElasticMachineProvisioning.stopMachineAsync(GridServiceAgent, long, TimeUnit)
raise UnsupportedOperationExceptionpublic FutureCleanupCloudResources cleanupCloudResources(long duration, TimeUnit unit)
NonBlockingElasticMachineProvisioning
cleanupCloudResources
in interface NonBlockingElasticMachineProvisioning
public void setElasticProcessingUnitMachineIsolation(ElasticProcessingUnitMachineIsolation isolation)
setElasticProcessingUnitMachineIsolation
in interface ElasticProcessingUnitMachineIsolationAware
public void setElasticMachineProvisioningProgressChangedEventListener(ElasticMachineProvisioningProgressChangedEventListener machineEventListener)
public void setElasticGridServiceAgentProvisioningProgressEventListener(ElasticGridServiceAgentProvisioningProgressChangedEventListener agentEventListener)
public ElasticMachineProvisioning getElasticMachineProvisioning()
Copyright © GigaSpaces.