public class ElasticMachineProvisioningDiscoveredMachinesCache extends Object implements DiscoveredMachinesCache, GridServiceAgentAddedEventListener, GridServiceAgentRemovedEventListener, Runnable
Constructor and Description |
---|
ElasticMachineProvisioningDiscoveredMachinesCache(ProcessingUnit pu,
NonBlockingElasticMachineProvisioning machineProvisioning,
boolean quiteMode,
long pollingIntervalSeconds)
Quite mode fall backs to the admin API (lookup discovery) in case of exceptions from the machine provisioning
|
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
Collection<GridServiceAgent> |
getDiscoveredAgents() |
void |
gridServiceAgentAdded(GridServiceAgent gridServiceAgent)
Called when a grid service is added.
|
void |
gridServiceAgentRemoved(GridServiceAgent gridServiceAgent)
Called when a grid service is removed.
|
void |
run()
Synchronizes the list of agents with the machine provisioning bean
We use the syncAgents flag to make sure there is no more than one concurrent call to machineProvisioning
|
public ElasticMachineProvisioningDiscoveredMachinesCache(ProcessingUnit pu, NonBlockingElasticMachineProvisioning machineProvisioning, boolean quiteMode, long pollingIntervalSeconds)
public void destroy()
public Collection<GridServiceAgent> getDiscoveredAgents() throws WaitingForDiscoveredMachinesException, FailedToDiscoverMachinesException
getDiscoveredAgents
in interface DiscoveredMachinesCache
WaitingForDiscoveredMachinesException
FailedToDiscoverMachinesException
public void gridServiceAgentRemoved(GridServiceAgent gridServiceAgent)
GridServiceAgentRemovedEventListener
gridServiceAgentRemoved
in interface GridServiceAgentRemovedEventListener
public void gridServiceAgentAdded(GridServiceAgent gridServiceAgent)
GridServiceAgentAddedEventListener
gridServiceAgentAdded
in interface GridServiceAgentAddedEventListener
Copyright © GigaSpaces.