Class DefaultGridServiceAgents
java.lang.Object
org.openspaces.admin.internal.gsa.DefaultGridServiceAgents
- All Implemented Interfaces:
Iterable<GridServiceAgent>,AdminAware,DumpProvider,GridServiceAgents,InternalGridServiceAgents
- Author:
- kimchy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGridServiceAgent(InternalGridServiceAgent gridServiceAgent) voidaddLifecycleListener(GridServiceAgentLifecycleEventListener eventListener) Allows to add aGridServiceAgentLifecycleEventListener.generateDump(String cause, Map<String, Object> context) Generates dump for all the provided dump processors.Generates dump for the provided processors.getAdmin()Returns theAdminassociated with this element.getAgentByUID(String uid) Returns an agent based on its uid.Returns all the currently discovered agents.Returns the grid service agent added event manager allowing to add and removeGridServiceAgentAddedEventListeners.Returns the grid service agent added event manager allowing to add and removeGridServiceAgentRemovedEventListeners.Returns a map of grid service agent with the key as the host address it is running on.Returns a map of grid service agent with the key as the host name it is running on.intgetSize()Returns the number of agents current discovered.getUids()Returns a map of grid service agent with the key as the uid.booleanisEmpty()Returnstrueif there are no agents,falseotherwise.iterator()voidremoveLifecycleListener(GridServiceAgentLifecycleEventListener eventListener) Allows to remove aGridServiceAgentLifecycleEventListener.booleanwaitFor(int numberOfAgents) Waits indefinitely till the provided number of agents are up.booleanWaits for the given timeout (in time unit) till the provided number of agents are up.Waits indefinitely till at least one agent is discovered.waitForAtLeastOne(long timeout, TimeUnit timeUnit) Waits for the given timeout (in time unit) till at least one agent is discovered.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DefaultGridServiceAgents
-
-
Method Details
-
getAdmin
Description copied from interface:AdminAwareReturns theAdminassociated with this element.- Specified by:
getAdminin interfaceAdminAware
-
getAgents
Description copied from interface:GridServiceAgentsReturns all the currently discovered agents.- Specified by:
getAgentsin interfaceGridServiceAgents
-
getAgentByUID
Description copied from interface:GridServiceAgentsReturns an agent based on its uid.- Specified by:
getAgentByUIDin interfaceGridServiceAgents- See Also:
-
getUids
Description copied from interface:GridServiceAgentsReturns a map of grid service agent with the key as the uid.- Specified by:
getUidsin interfaceGridServiceAgents
-
getHostAddress
Description copied from interface:GridServiceAgentsReturns a map of grid service agent with the key as the host address it is running on.- Specified by:
getHostAddressin interfaceGridServiceAgents
-
getHostNames
Description copied from interface:GridServiceAgentsReturns a map of grid service agent with the key as the host name it is running on.- Specified by:
getHostNamesin interfaceGridServiceAgents
-
getSize
public int getSize()Description copied from interface:GridServiceAgentsReturns the number of agents current discovered.- Specified by:
getSizein interfaceGridServiceAgents
-
isEmpty
public boolean isEmpty()Description copied from interface:GridServiceAgentsReturnstrueif there are no agents,falseotherwise.- Specified by:
isEmptyin interfaceGridServiceAgents
-
iterator
- Specified by:
iteratorin interfaceIterable<GridServiceAgent>
-
waitForAtLeastOne
Description copied from interface:GridServiceAgentsWaits indefinitely till at least one agent is discovered.- Specified by:
waitForAtLeastOnein interfaceGridServiceAgents
-
waitForAtLeastOne
Description copied from interface:GridServiceAgentsWaits for the given timeout (in time unit) till at least one agent is discovered.- Specified by:
waitForAtLeastOnein interfaceGridServiceAgents
-
waitFor
public boolean waitFor(int numberOfAgents) Description copied from interface:GridServiceAgentsWaits indefinitely till the provided number of agents are up.- Specified by:
waitForin interfaceGridServiceAgents- Parameters:
numberOfAgents- The number of agents to wait for
-
waitFor
Description copied from interface:GridServiceAgentsWaits for the given timeout (in time unit) till the provided number of agents are up.- Specified by:
waitForin interfaceGridServiceAgents- Parameters:
numberOfAgents- The number of agents to wait for
-
getGridServiceAgentAdded
Description copied from interface:GridServiceAgentsReturns the grid service agent added event manager allowing to add and removeGridServiceAgentAddedEventListeners.- Specified by:
getGridServiceAgentAddedin interfaceGridServiceAgents
-
getGridServiceAgentRemoved
Description copied from interface:GridServiceAgentsReturns the grid service agent added event manager allowing to add and removeGridServiceAgentRemovedEventListeners.- Specified by:
getGridServiceAgentRemovedin interfaceGridServiceAgents
-
addLifecycleListener
Description copied from interface:GridServiceAgentsAllows to add aGridServiceAgentLifecycleEventListener.- Specified by:
addLifecycleListenerin interfaceGridServiceAgents
-
removeLifecycleListener
Description copied from interface:GridServiceAgentsAllows to remove aGridServiceAgentLifecycleEventListener.- Specified by:
removeLifecycleListenerin interfaceGridServiceAgents
-
addGridServiceAgent
- Specified by:
addGridServiceAgentin interfaceInternalGridServiceAgents
-
removeGridServiceAgent
- Specified by:
removeGridServiceAgentin interfaceInternalGridServiceAgents
-
generateDump
Description copied from interface:DumpProviderGenerates dump for all the provided dump processors. Note, this will include a heap dump which can consume time and potentially be of very large size- Specified by:
generateDumpin interfaceDumpProvider- Parameters:
cause- The cause that this dump was generatedcontext- Allows to provide specific parameters to specific processors- Throws:
AdminException
-
generateDump
public DumpResult generateDump(String cause, Map<String, Object> context, String... processor) throws AdminExceptionDescription copied from interface:DumpProviderGenerates dump for the provided processors. The current list of processors include:- summary: General summary information of the process.
- network: Information on the network layer of the process and the OS network stats.
- thread: Thread dump of the process.
- heap: Heap dump of the process. Note, this is a heavy operation and can produce very large dump files
- log: Adds all the log files of the process to the dump file.
- processingUnits: Dump of all the processing units (applicable only for GSCs) information.
- Specified by:
generateDumpin interfaceDumpProvider- Parameters:
cause- The cause this dump was generated.context- Allows to provide specific parameters to specific processors.processor- The list of processors to be used.- Throws:
AdminException
-
getAgentsGroupByReservationId
- Specified by:
getAgentsGroupByReservationIdin interfaceInternalGridServiceAgents- Returns:
- all agents indexed by their reservationId
-