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
ElasticGridServiceAgentProvisioningFailureEventListener s. |
ElasticGridServiceAgentProvisioningProgressChangedEventManager |
getElasticGridServiceAgentProvisioningProgressChanged()
Returns the elastic grid service agent provisioning progress event manager allowing to add
and remove
ElasticGridServiceAgentProvisioningProgressChangedEventListener s. |
GridServiceAgentAddedEventManager |
getGridServiceAgentAdded()
Returns the grid service agent added event manager allowing to add and remove
GridServiceAgentAddedEventListener s. |
GridServiceAgentRemovedEventManager |
getGridServiceAgentRemoved()
Returns the grid service agent added event manager allowing to add and remove
GridServiceAgentRemovedEventListener s. |
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, wait
forEach, spliterator
public DefaultGridServiceAgents(InternalAdmin admin)
public Admin getAdmin()
AdminAware
Admin
associated with this element.getAdmin
in interface AdminAware
public GridServiceAgent[] getAgents()
GridServiceAgents
getAgents
in interface GridServiceAgents
public GridServiceAgent getAgentByUID(String uid)
GridServiceAgents
getAgentByUID
in interface GridServiceAgents
GridComponent.getUid()
public Map<String,GridServiceAgent> getUids()
GridServiceAgents
getUids
in interface GridServiceAgents
public Map<String,GridServiceAgent> getHostAddress()
GridServiceAgents
getHostAddress
in interface GridServiceAgents
public Map<String,GridServiceAgent> getHostNames()
GridServiceAgents
getHostNames
in interface GridServiceAgents
public int getSize()
GridServiceAgents
getSize
in interface GridServiceAgents
public boolean isEmpty()
GridServiceAgents
true
if there are no agents, false
otherwise.isEmpty
in interface GridServiceAgents
public Iterator<GridServiceAgent> iterator()
iterator
in interface Iterable<GridServiceAgent>
public GridServiceAgent waitForAtLeastOne()
GridServiceAgents
waitForAtLeastOne
in interface GridServiceAgents
public GridServiceAgent waitForAtLeastOne(long timeout, TimeUnit timeUnit)
GridServiceAgents
waitForAtLeastOne
in interface GridServiceAgents
public boolean waitFor(int numberOfAgents)
GridServiceAgents
waitFor
in interface GridServiceAgents
numberOfAgents
- The number of agents to wait forpublic boolean waitFor(int numberOfAgents, long timeout, TimeUnit timeUnit)
GridServiceAgents
waitFor
in interface GridServiceAgents
numberOfAgents
- The number of agents to wait forpublic GridServiceAgentAddedEventManager getGridServiceAgentAdded()
GridServiceAgents
GridServiceAgentAddedEventListener
s.getGridServiceAgentAdded
in interface GridServiceAgents
public GridServiceAgentRemovedEventManager getGridServiceAgentRemoved()
GridServiceAgents
GridServiceAgentRemovedEventListener
s.getGridServiceAgentRemoved
in interface GridServiceAgents
public void addLifecycleListener(GridServiceAgentLifecycleEventListener eventListener)
GridServiceAgents
GridServiceAgentLifecycleEventListener
.addLifecycleListener
in interface GridServiceAgents
public void removeLifecycleListener(GridServiceAgentLifecycleEventListener eventListener)
GridServiceAgents
GridServiceAgentLifecycleEventListener
.removeLifecycleListener
in interface GridServiceAgents
public void addGridServiceAgent(InternalGridServiceAgent gridServiceAgent)
addGridServiceAgent
in interface InternalGridServiceAgents
public InternalGridServiceAgent removeGridServiceAgent(String uid)
removeGridServiceAgent
in interface InternalGridServiceAgents
public DumpResult generateDump(String cause, Map<String,Object> context) throws AdminException
DumpProvider
generateDump
in interface DumpProvider
cause
- The cause that this dump was generatedcontext
- Allows to provide specific parameters to specific processorsAdminException
public DumpResult generateDump(String cause, Map<String,Object> context, String... processor) throws AdminException
DumpProvider
generateDump
in interface DumpProvider
cause
- The cause this dump was generated.context
- Allows to provide specific parameters to specific processors.processor
- The list of processors to be used.AdminException
public ElasticGridServiceAgentProvisioningFailureEventManager getElasticGridServiceAgentProvisioningFailure()
GridServiceAgents
ElasticGridServiceAgentProvisioningFailureEventListener
s.getElasticGridServiceAgentProvisioningFailure
in interface GridServiceAgents
public ElasticGridServiceAgentProvisioningProgressChangedEventManager getElasticGridServiceAgentProvisioningProgressChanged()
GridServiceAgents
ElasticGridServiceAgentProvisioningProgressChangedEventListener
s.getElasticGridServiceAgentProvisioningProgressChanged
in interface GridServiceAgents
public void processElasticScaleStrategyEvent(ElasticProcessingUnitEvent event)
InternalGridServiceAgents
processElasticScaleStrategyEvent
in interface InternalGridServiceAgents
public Map<GSAReservationId,Collection<GridServiceAgent>> getAgentsGroupByReservationId()
getAgentsGroupByReservationId
in interface InternalGridServiceAgents
Copyright © GigaSpaces.