GigaSpaces XAP 9.7.2 API

org.openspaces.admin.gsa
Interface GridServiceAgents

All Superinterfaces:
AdminAware, DumpProvider, Iterable<GridServiceAgent>

public interface GridServiceAgents
extends AdminAware, Iterable<GridServiceAgent>, DumpProvider

Grid Service Agents hold all the different GridServiceAgent that are currently discovered.

Provides simple means to get all the current agents, as well as as registering for agent lifecycle (added and removed) events.

Author:
kimchy

Method Summary
 void addLifecycleListener(GridServiceAgentLifecycleEventListener eventListener)
          Allows to add a GridServiceAgentLifecycleEventListener.
 GridServiceAgent getAgentByUID(String uid)
          Returns an agent based on its uid.
 GridServiceAgent[] getAgents()
          Returns all the currently discovered agents.
 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.
 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.
 
Methods inherited from interface org.openspaces.admin.AdminAware
getAdmin
 
Methods inherited from interface java.lang.Iterable
iterator
 
Methods inherited from interface org.openspaces.admin.dump.DumpProvider
generateDump, generateDump
 

Method Detail

getAgents

GridServiceAgent[] getAgents()
Returns all the currently discovered agents.


getAgentByUID

GridServiceAgent getAgentByUID(String uid)
Returns an agent based on its uid.

See Also:
GridComponent.getUid()

getUids

Map<String,GridServiceAgent> getUids()
Returns a map of grid service agent with the key as the uid.


getHostAddress

Map<String,GridServiceAgent> getHostAddress()
Returns a map of grid service agent with the key as the host address it is running on.


getHostNames

Map<String,GridServiceAgent> getHostNames()
Returns a map of grid service agent with the key as the host name it is running on.


getSize

int getSize()
Returns the number of agents current discovered.


isEmpty

boolean isEmpty()
Returns true if there are no agents, false otherwise.


waitForAtLeastOne

GridServiceAgent waitForAtLeastOne()
Waits indefinitely till at least one agent is discovered.


waitForAtLeastOne

GridServiceAgent waitForAtLeastOne(long timeout,
                                   TimeUnit timeUnit)
Waits for the given timeout (in time unit) till at least one agent is discovered.


waitFor

boolean waitFor(int numberOfAgents)
Waits indefinitely till the provided number of agents are up.

Parameters:
numberOfAgents - The number of agents to wait for

waitFor

boolean waitFor(int numberOfAgents,
                long timeout,
                TimeUnit timeUnit)
Waits for the given timeout (in time unit) till the provided number of agents are up.

Parameters:
numberOfAgents - The number of agents to wait for

getGridServiceAgentAdded

GridServiceAgentAddedEventManager getGridServiceAgentAdded()
Returns the grid service agent added event manager allowing to add and remove GridServiceAgentAddedEventListeners.


getGridServiceAgentRemoved

GridServiceAgentRemovedEventManager getGridServiceAgentRemoved()
Returns the grid service agent added event manager allowing to add and remove GridServiceAgentRemovedEventListeners.


addLifecycleListener

void addLifecycleListener(GridServiceAgentLifecycleEventListener eventListener)
Allows to add a GridServiceAgentLifecycleEventListener.


removeLifecycleListener

void removeLifecycleListener(GridServiceAgentLifecycleEventListener eventListener)
Allows to remove a GridServiceAgentLifecycleEventListener.


getElasticGridServiceAgentProvisioningFailure

ElasticGridServiceAgentProvisioningFailureEventManager getElasticGridServiceAgentProvisioningFailure()
Returns the elastic grid service agent provisioning failure event manager allowing to add and remove ElasticGridServiceAgentProvisioningFailureEventListeners.

Since:
8.0.6

getElasticGridServiceAgentProvisioningProgressChanged

ElasticGridServiceAgentProvisioningProgressChangedEventManager getElasticGridServiceAgentProvisioningProgressChanged()
Returns the elastic grid service agent provisioning progress event manager allowing to add and remove ElasticGridServiceAgentProvisioningProgressChangedEventListeners.

Since:
8.0.6

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.