public class DefaultGridServiceAgents extends Object implements InternalGridServiceAgents
| Constructor and Description |
|---|
DefaultGridServiceAgents(InternalAdmin admin) |
| Modifier and Type | Method and Description |
|---|---|
void |
addGridServiceAgent(InternalGridServiceAgent gridServiceAgent) |
void |
addLifecycleListener(GridServiceAgentLifecycleEventListener eventListener)
Allows to add a
GridServiceAgentLifecycleEventListener. |
DumpResult |
generateDump(String cause,
Map<String,Object> context)
Generates dump for all the provided dump processors.
|
DumpResult |
generateDump(String cause,
Map<String,Object> context,
String... processor)
Generates dump for the provided processors.
|
Admin |
getAdmin()
Returns the
Admin associated with this element. |
GridServiceAgent |
getAgentByUID(String uid)
Returns an agent based on its uid.
|
GridServiceAgent[] |
getAgents()
Returns all the currently discovered agents.
|
Map<GSAReservationId,Collection<GridServiceAgent>> |
getAgentsGroupByReservationId() |
ElasticGridServiceAgentProvisioningFailureEventManager |
getElasticGridServiceAgentProvisioningFailure()
Returns the elastic grid service agent provisioning failure event manager allowing to add and
remove
ElasticGridServiceAgentProvisioningFailureEventListeners. |
ElasticGridServiceAgentProvisioningProgressChangedEventManager |
getElasticGridServiceAgentProvisioningProgressChanged()
Returns the elastic grid service agent provisioning progress event manager allowing to add
and remove
ElasticGridServiceAgentProvisioningProgressChangedEventListeners. |
GridServiceAgentAddedEventManager |
getGridServiceAgentAdded()
Returns the grid service agent added event manager allowing to add and remove
GridServiceAgentAddedEventListeners. |
GridServiceAgentRemovedEventManager |
getGridServiceAgentRemoved()
Returns the grid service agent added event manager allowing to add and remove
GridServiceAgentRemovedEventListeners. |
Map<String,GridServiceAgent> |
getHostAddress()
Returns a map of grid service agent with the key as the host address it is running on.
|
Map<String,GridServiceAgent> |
getHostNames()
Returns a map of grid service agent with the key as the host name it is running on.
|
int |
getSize()
Returns the number of agents current discovered.
|
Map<String,GridServiceAgent> |
getUids()
Returns a map of grid service agent with the key as the uid.
|
boolean |
isEmpty()
Returns
true if there are no agents, false otherwise. |
Iterator<GridServiceAgent> |
iterator() |
void |
processElasticScaleStrategyEvent(ElasticProcessingUnitEvent event)
If relevant raises events to relevant subscribers
|
InternalGridServiceAgent |
removeGridServiceAgent(String uid) |
void |
removeLifecycleListener(GridServiceAgentLifecycleEventListener eventListener)
Allows to remove a
GridServiceAgentLifecycleEventListener. |
boolean |
waitFor(int numberOfAgents)
Waits indefinitely till the provided number of agents are up.
|
boolean |
waitFor(int numberOfAgents,
long timeout,
TimeUnit timeUnit)
Waits for the given timeout (in time unit) till the provided number of agents are up.
|
GridServiceAgent |
waitForAtLeastOne()
Waits indefinitely till at least one agent is discovered.
|
GridServiceAgent |
waitForAtLeastOne(long timeout,
TimeUnit timeUnit)
Waits for the given timeout (in time unit) till at least one agent is discovered.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic DefaultGridServiceAgents(InternalAdmin admin)
public Admin getAdmin()
AdminAwareAdmin associated with this element.getAdmin in interface AdminAwarepublic GridServiceAgent[] getAgents()
GridServiceAgentsgetAgents in interface GridServiceAgentspublic GridServiceAgent getAgentByUID(String uid)
GridServiceAgentsgetAgentByUID in interface GridServiceAgentsGridComponent.getUid()public Map<String,GridServiceAgent> getUids()
GridServiceAgentsgetUids in interface GridServiceAgentspublic Map<String,GridServiceAgent> getHostAddress()
GridServiceAgentsgetHostAddress in interface GridServiceAgentspublic Map<String,GridServiceAgent> getHostNames()
GridServiceAgentsgetHostNames in interface GridServiceAgentspublic int getSize()
GridServiceAgentsgetSize in interface GridServiceAgentspublic boolean isEmpty()
GridServiceAgentstrue if there are no agents, false otherwise.isEmpty in interface GridServiceAgentspublic Iterator<GridServiceAgent> iterator()
iterator in interface Iterable<GridServiceAgent>public GridServiceAgent waitForAtLeastOne()
GridServiceAgentswaitForAtLeastOne in interface GridServiceAgentspublic GridServiceAgent waitForAtLeastOne(long timeout, TimeUnit timeUnit)
GridServiceAgentswaitForAtLeastOne in interface GridServiceAgentspublic boolean waitFor(int numberOfAgents)
GridServiceAgentswaitFor in interface GridServiceAgentsnumberOfAgents - The number of agents to wait forpublic boolean waitFor(int numberOfAgents,
long timeout,
TimeUnit timeUnit)
GridServiceAgentswaitFor in interface GridServiceAgentsnumberOfAgents - The number of agents to wait forpublic GridServiceAgentAddedEventManager getGridServiceAgentAdded()
GridServiceAgentsGridServiceAgentAddedEventListeners.getGridServiceAgentAdded in interface GridServiceAgentspublic GridServiceAgentRemovedEventManager getGridServiceAgentRemoved()
GridServiceAgentsGridServiceAgentRemovedEventListeners.getGridServiceAgentRemoved in interface GridServiceAgentspublic void addLifecycleListener(GridServiceAgentLifecycleEventListener eventListener)
GridServiceAgentsGridServiceAgentLifecycleEventListener.addLifecycleListener in interface GridServiceAgentspublic void removeLifecycleListener(GridServiceAgentLifecycleEventListener eventListener)
GridServiceAgentsGridServiceAgentLifecycleEventListener.removeLifecycleListener in interface GridServiceAgentspublic void addGridServiceAgent(InternalGridServiceAgent gridServiceAgent)
addGridServiceAgent in interface InternalGridServiceAgentspublic InternalGridServiceAgent removeGridServiceAgent(String uid)
removeGridServiceAgent in interface InternalGridServiceAgentspublic DumpResult generateDump(String cause, Map<String,Object> context) throws AdminException
DumpProvidergenerateDump in interface DumpProvidercause - The cause that this dump was generatedcontext - Allows to provide specific parameters to specific processorsAdminExceptionpublic DumpResult generateDump(String cause, Map<String,Object> context, String... processor) throws AdminException
DumpProvidergenerateDump in interface DumpProvidercause - The cause this dump was generated.context - Allows to provide specific parameters to specific processors.processor - The list of processors to be used.AdminExceptionpublic ElasticGridServiceAgentProvisioningFailureEventManager getElasticGridServiceAgentProvisioningFailure()
GridServiceAgentsElasticGridServiceAgentProvisioningFailureEventListeners.getElasticGridServiceAgentProvisioningFailure in interface GridServiceAgentspublic ElasticGridServiceAgentProvisioningProgressChangedEventManager getElasticGridServiceAgentProvisioningProgressChanged()
GridServiceAgentsElasticGridServiceAgentProvisioningProgressChangedEventListeners.getElasticGridServiceAgentProvisioningProgressChanged in interface GridServiceAgentspublic void processElasticScaleStrategyEvent(ElasticProcessingUnitEvent event)
InternalGridServiceAgentsprocessElasticScaleStrategyEvent in interface InternalGridServiceAgentspublic Map<GSAReservationId,Collection<GridServiceAgent>> getAgentsGroupByReservationId()
getAgentsGroupByReservationId in interface InternalGridServiceAgentsCopyright © GigaSpaces.