public interface GridServiceAgents extends AdminAware, Iterable<GridServiceAgent>, DumpProvider
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.
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.
|
getAdminforEach, iterator, spliteratorgenerateDump, generateDumpGridServiceAgent[] getAgents()
GridServiceAgent getAgentByUID(String uid)
GridComponent.getUid()Map<String,GridServiceAgent> getUids()
Map<String,GridServiceAgent> getHostAddress()
Map<String,GridServiceAgent> getHostNames()
int getSize()
boolean isEmpty()
true if there are no agents, false otherwise.GridServiceAgent waitForAtLeastOne()
GridServiceAgent waitForAtLeastOne(long timeout, TimeUnit timeUnit)
boolean waitFor(int numberOfAgents)
numberOfAgents - The number of agents to wait forboolean waitFor(int numberOfAgents,
long timeout,
TimeUnit timeUnit)
numberOfAgents - The number of agents to wait forGridServiceAgentAddedEventManager getGridServiceAgentAdded()
GridServiceAgentAddedEventListeners.GridServiceAgentRemovedEventManager getGridServiceAgentRemoved()
GridServiceAgentRemovedEventListeners.void addLifecycleListener(GridServiceAgentLifecycleEventListener eventListener)
GridServiceAgentLifecycleEventListener.void removeLifecycleListener(GridServiceAgentLifecycleEventListener eventListener)
GridServiceAgentLifecycleEventListener.Copyright © GigaSpaces.