GigaSpaces XAP 9.7.2 API

org.openspaces.grid.gsm.machines
Interface MachinesSlaEnforcementEndpoint

All Superinterfaces:
ServiceLevelAgreementEnforcementEndpoint

public interface MachinesSlaEnforcementEndpoint
extends ServiceLevelAgreementEnforcementEndpoint

A service that on demand enforces the specified number of machines.

Author:
itaif
See Also:
CapacityMachinesSlaPolicy

Method Summary
 void afterUndeployedProcessingUnit(ProcessingUnit pu)
          Erases all Allocated (state) that is related to the specified processing unit.
 void beforeUndeployedProcessingUnit(ProcessingUnit pu)
          Marks that the processing unit is being undeployed.
 void cleanupCloud(ProcessingUnit pu, NonBlockingElasticMachineProvisioning machineProvisioning)
          Erases all Allocated (state) that is related to the specified processing unit.
 void enforceSla(CapacityMachinesSlaPolicy sla)
           
 void enforceSla(EagerMachinesSlaPolicy sla)
           
 CapacityRequirementsPerAgent getAllocatedCapacity(AbstractMachinesSlaPolicy sla)
           
 CapacityRequirementsPerAgent getAllocatedCapacityFilterUndiscoveredAgents(AbstractMachinesSlaPolicy sla)
           
 Set<ZonesConfig> getGridServiceAgentsZones()
           
 MachinesSlaEnforcementState.RecoveryState getRecoveredStateOnEsmStart(ProcessingUnit processingUnit)
           
 Set<ZonesConfig> getUndeployedGridServiceAgentsZones()
           
 void recoveredStateOnEsmStart(ProcessingUnit processingUnit)
          Mark that the specified processing unit has recovered state.
 void recoverStateOnEsmStart(AbstractMachinesSlaPolicy sla)
          Recover state for the specified SLA.
 boolean replaceAllocatedCapacity(AbstractMachinesSlaPolicy sla)
          Replaces the allocated capacity of the specified sla zones, with the allocated capacity
 

Method Detail

enforceSla

void enforceSla(EagerMachinesSlaPolicy sla)
                throws GridServiceAgentSlaEnforcementInProgressException
Throws:
GridServiceAgentSlaEnforcementInProgressException

enforceSla

void enforceSla(CapacityMachinesSlaPolicy sla)
                throws MachinesSlaEnforcementInProgressException,
                       GridServiceAgentSlaEnforcementInProgressException
Throws:
MachinesSlaEnforcementInProgressException
GridServiceAgentSlaEnforcementInProgressException

getAllocatedCapacityFilterUndiscoveredAgents

CapacityRequirementsPerAgent getAllocatedCapacityFilterUndiscoveredAgents(AbstractMachinesSlaPolicy sla)
Returns:
a list of agents for this pu including memory/cpu for each. Non-discovered agents are removed from returned capacity

getAllocatedCapacity

CapacityRequirementsPerAgent getAllocatedCapacity(AbstractMachinesSlaPolicy sla)
Returns:
a list of agents for this pu including memory/cpu for each. Non-discovered agents throw IllegalStateException

recoverStateOnEsmStart

void recoverStateOnEsmStart(AbstractMachinesSlaPolicy sla)
                            throws SomeProcessingUnitsHaveNotCompletedStateRecoveryException,
                                   NeedToWaitUntilAllGridServiceAgentsDiscoveredException,
                                   UndeployInProgressException
Recover state for the specified SLA.

Throws:
UndeployInProgressException
SomeProcessingUnitsHaveNotCompletedStateRecoveryException
NeedToWaitUntilAllGridServiceAgentsDiscoveredException
Since:
9.1.0

recoveredStateOnEsmStart

void recoveredStateOnEsmStart(ProcessingUnit processingUnit)
Mark that the specified processing unit has recovered state.

Since:
9.1.0

getRecoveredStateOnEsmStart

MachinesSlaEnforcementState.RecoveryState getRecoveredStateOnEsmStart(ProcessingUnit processingUnit)
Returns:
true if the specified processing unit has recovered state
Since:
9.5

getGridServiceAgentsZones

Set<ZonesConfig> getGridServiceAgentsZones()
Returns:
a list of zones that are being tracked for the specified processing unit

getUndeployedGridServiceAgentsZones

Set<ZonesConfig> getUndeployedGridServiceAgentsZones()
Returns:
a list of zones that are being tracked for the specified processing unit, but do not have any state

replaceAllocatedCapacity

boolean replaceAllocatedCapacity(AbstractMachinesSlaPolicy sla)
Replaces the allocated capacity of the specified sla zones, with the allocated capacity

Returns:
true if actually changed anything in the allocation
Since:
9.1.0

beforeUndeployedProcessingUnit

void beforeUndeployedProcessingUnit(ProcessingUnit pu)
Marks that the processing unit is being undeployed.

Since:
9.1.0

afterUndeployedProcessingUnit

void afterUndeployedProcessingUnit(ProcessingUnit pu)
Erases all Allocated (state) that is related to the specified processing unit.

Since:
9.1.0

cleanupCloud

void cleanupCloud(ProcessingUnit pu,
                  NonBlockingElasticMachineProvisioning machineProvisioning)
                  throws MachinesSlaEnforcementInProgressException
Erases all Allocated (state) that is related to the specified processing unit. Calls cloud driver NonBlockingElasticMachineProvisioning.cleanupCloudResources(long, java.util.concurrent.TimeUnit)

Parameters:
pu - - the processing unit in which the cloud resources needs to be cleaned.
machineProvisioning -
Throws:
MachinesSlaEnforcementInProgressException
Since:
9.6

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.