Class DefaultGridServiceContainers
java.lang.Object
org.openspaces.admin.internal.gsc.DefaultGridServiceContainers
- All Implemented Interfaces:
Iterable<GridServiceContainer>,AdminAware,DumpProvider,GridServiceContainers,InternalGridServiceContainers
- Author:
- kimchy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGridServiceContainer(InternalGridServiceContainer gridServiceContainer) voidaddLifecycleListener(GridServiceContainerLifecycleEventListener eventListener) Allows to add aGridServiceContainerLifecycleEventListener.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.getContainerByUID(String uid) Returns a container based on its uid.Returns all the currently discovered containers.Returns the grid service container added event manager allowing to add and removeGridServiceContainerAddedEventListeners.Returns the grid service container added event manager allowing to add and removeGridServiceContainerRemovedEventListeners.intgetSize()Returns the number of containers current discovered.getUids()Returns a map of grid service container with the key as the uid.booleanisEmpty()Returnstrueif there are no containers,falseotherwise.iterator()voidAllows to remove aGridServiceContainerLifecycleEventListener.booleanwaitFor(int numberOfGridServiceContainers) Waits indefinitely till the provided number of containers are up.booleanWaits for the given timeout (in time unit) till the provided number of containers are up.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
-
DefaultGridServiceContainers
-
-
Method Details
-
getAdmin
Description copied from interface:AdminAwareReturns theAdminassociated with this element.- Specified by:
getAdminin interfaceAdminAware
-
getGridServiceContainerAdded
Description copied from interface:GridServiceContainersReturns the grid service container added event manager allowing to add and removeGridServiceContainerAddedEventListeners.- Specified by:
getGridServiceContainerAddedin interfaceGridServiceContainers
-
getGridServiceContainerRemoved
Description copied from interface:GridServiceContainersReturns the grid service container added event manager allowing to add and removeGridServiceContainerRemovedEventListeners.- Specified by:
getGridServiceContainerRemovedin interfaceGridServiceContainers
-
getContainers
Description copied from interface:GridServiceContainersReturns all the currently discovered containers.- Specified by:
getContainersin interfaceGridServiceContainers
-
getContainerByUID
Description copied from interface:GridServiceContainersReturns a container based on its uid.- Specified by:
getContainerByUIDin interfaceGridServiceContainers- See Also:
-
getUids
Description copied from interface:GridServiceContainersReturns a map of grid service container with the key as the uid.- Specified by:
getUidsin interfaceGridServiceContainers
-
getSize
public int getSize()Description copied from interface:GridServiceContainersReturns the number of containers current discovered.- Specified by:
getSizein interfaceGridServiceContainers
-
isEmpty
public boolean isEmpty()Description copied from interface:GridServiceContainersReturnstrueif there are no containers,falseotherwise.- Specified by:
isEmptyin interfaceGridServiceContainers
-
waitFor
public boolean waitFor(int numberOfGridServiceContainers) Description copied from interface:GridServiceContainersWaits indefinitely till the provided number of containers are up. When passing 0, will wait till there are no more grid service containers.- Specified by:
waitForin interfaceGridServiceContainers- Parameters:
numberOfGridServiceContainers- The number of containers to wait for
-
waitFor
Description copied from interface:GridServiceContainersWaits for the given timeout (in time unit) till the provided number of containers are up. Returnstrueif the required number of containers were discovered,falseif the timeout expired.When passing 0, will wait till there are not more containers.
- Specified by:
waitForin interfaceGridServiceContainers- Parameters:
numberOfGridServiceContainers- The number of containers to wait for
-
addLifecycleListener
Description copied from interface:GridServiceContainersAllows to add aGridServiceContainerLifecycleEventListener.- Specified by:
addLifecycleListenerin interfaceGridServiceContainers
-
removeLifecycleListener
Description copied from interface:GridServiceContainersAllows to remove aGridServiceContainerLifecycleEventListener.- Specified by:
removeLifecycleListenerin interfaceGridServiceContainers
-
iterator
- Specified by:
iteratorin interfaceIterable<GridServiceContainer>
-
addGridServiceContainer
- Specified by:
addGridServiceContainerin interfaceInternalGridServiceContainers
-
removeGridServiceContainer
- Specified by:
removeGridServiceContainerin interfaceInternalGridServiceContainers
-
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
-