Class DefaultLookupServices
java.lang.Object
org.openspaces.admin.internal.lus.DefaultLookupServices
- All Implemented Interfaces:
Iterable<LookupService>,AdminAware,DumpProvider,InternalLookupServices,LookupServices
- Author:
- kimchy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLifecycleListener(LookupServiceLifecycleEventListener eventListener) Allows to add aLookupServiceLifecycleEventListener.voidaddLookupService(InternalLookupService lookupService) 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.Returns the lookup service added event manager allowing to add and removeLookupServiceAddedEventListeners.Returns a lus based on its uid.Returns the grid service container added event manager allowing to add and removeLookupServiceRemovedEventManagers.Returns all the currently discovered lus.intgetSize()Returns the number of lookup services current discovered.getUids()Returns a map of lookup service with the key as the uid.booleanisEmpty()Returnstrueif there are no containers,falseotherwise.iterator()voidremoveLifecycleListener(LookupServiceLifecycleEventListener eventListener) Allows to remove aLookupServiceLifecycleEventListener.booleanwaitFor(int numberOfLookupServices) Waits indefinitely till the provided number of lookup services are up.booleanWaits for the given timeout (in time unit) till the provided number of lookup services 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
-
DefaultLookupServices
-
-
Method Details
-
getAdmin
Description copied from interface:AdminAwareReturns theAdminassociated with this element.- Specified by:
getAdminin interfaceAdminAware
-
getLookupServices
Description copied from interface:LookupServicesReturns all the currently discovered lus.- Specified by:
getLookupServicesin interfaceLookupServices
-
iterator
- Specified by:
iteratorin interfaceIterable<LookupService>
-
getLookupServiceByUID
Description copied from interface:LookupServicesReturns a lus based on its uid.- Specified by:
getLookupServiceByUIDin interfaceLookupServices- See Also:
-
getUids
Description copied from interface:LookupServicesReturns a map of lookup service with the key as the uid.- Specified by:
getUidsin interfaceLookupServices
-
getSize
public int getSize()Description copied from interface:LookupServicesReturns the number of lookup services current discovered.- Specified by:
getSizein interfaceLookupServices
-
isEmpty
public boolean isEmpty()Description copied from interface:LookupServicesReturnstrueif there are no containers,falseotherwise.- Specified by:
isEmptyin interfaceLookupServices
-
waitFor
public boolean waitFor(int numberOfLookupServices) Description copied from interface:LookupServicesWaits indefinitely till the provided number of lookup services are up.- Specified by:
waitForin interfaceLookupServices- Parameters:
numberOfLookupServices- The number of lookup services to wait for
-
waitFor
Description copied from interface:LookupServicesWaits for the given timeout (in time unit) till the provided number of lookup services are up. Returnstrueif the required number of lookup services were discovered,falseif the timeout expired.- Specified by:
waitForin interfaceLookupServices- Parameters:
numberOfLookupServices- The number of lookup services to wait for
-
addLifecycleListener
Description copied from interface:LookupServicesAllows to add aLookupServiceLifecycleEventListener.- Specified by:
addLifecycleListenerin interfaceLookupServices
-
removeLifecycleListener
Description copied from interface:LookupServicesAllows to remove aLookupServiceLifecycleEventListener.- Specified by:
removeLifecycleListenerin interfaceLookupServices
-
addLookupService
- Specified by:
addLookupServicein interfaceInternalLookupServices
-
removeLookupService
- Specified by:
removeLookupServicein interfaceInternalLookupServices
-
getLookupServiceAdded
Description copied from interface:LookupServicesReturns the lookup service added event manager allowing to add and removeLookupServiceAddedEventListeners.- Specified by:
getLookupServiceAddedin interfaceLookupServices
-
getLookupServiceRemoved
Description copied from interface:LookupServicesReturns the grid service container added event manager allowing to add and removeLookupServiceRemovedEventManagers.- Specified by:
getLookupServiceRemovedin interfaceLookupServices
-
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
-