public class DefaultLookupServices extends Object implements InternalLookupServices
| Constructor and Description |
|---|
DefaultLookupServices(InternalAdmin admin) |
| Modifier and Type | Method and Description |
|---|---|
void |
addLifecycleListener(LookupServiceLifecycleEventListener eventListener)
Allows to add a
LookupServiceLifecycleEventListener. |
void |
addLookupService(InternalLookupService lookupService) |
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. |
LookupServiceAddedEventManager |
getLookupServiceAdded()
Returns the lookup service added event manager allowing to add and remove
LookupServiceAddedEventListeners. |
LookupService |
getLookupServiceByUID(String id)
Returns a lus based on its uid.
|
LookupServiceRemovedEventManager |
getLookupServiceRemoved()
Returns the grid service container added event manager allowing to add and remove
LookupServiceRemovedEventManagers. |
LookupService[] |
getLookupServices()
Returns all the currently discovered lus.
|
int |
getSize()
Returns the number of lookup services current discovered.
|
Map<String,LookupService> |
getUids()
Returns a map of lookup service with the key as the uid.
|
boolean |
isEmpty()
Returns
true if there are no containers, false otherwise. |
Iterator<LookupService> |
iterator() |
void |
removeLifecycleListener(LookupServiceLifecycleEventListener eventListener)
Allows to remove a
LookupServiceLifecycleEventListener. |
InternalLookupService |
removeLookupService(String UID) |
boolean |
waitFor(int numberOfLookupServices)
Waits indefinitely till the provided number of lookup services are up.
|
boolean |
waitFor(int numberOfLookupServices,
long timeout,
TimeUnit timeUnit)
Waits for the given timeout (in time unit) till the provided number of lookup services are
up.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic DefaultLookupServices(InternalAdmin admin)
public Admin getAdmin()
AdminAwareAdmin associated with this element.getAdmin in interface AdminAwarepublic LookupService[] getLookupServices()
LookupServicesgetLookupServices in interface LookupServicespublic Iterator<LookupService> iterator()
iterator in interface Iterable<LookupService>public LookupService getLookupServiceByUID(String id)
LookupServicesgetLookupServiceByUID in interface LookupServicesGridComponent.getUid()public Map<String,LookupService> getUids()
LookupServicesgetUids in interface LookupServicespublic int getSize()
LookupServicesgetSize in interface LookupServicespublic boolean isEmpty()
LookupServicestrue if there are no containers, false otherwise.isEmpty in interface LookupServicespublic boolean waitFor(int numberOfLookupServices)
LookupServiceswaitFor in interface LookupServicesnumberOfLookupServices - The number of lookup services to wait forpublic boolean waitFor(int numberOfLookupServices,
long timeout,
TimeUnit timeUnit)
LookupServicestrue if the required number of lookup services were discovered,
false if the timeout expired.waitFor in interface LookupServicesnumberOfLookupServices - The number of lookup services to wait forpublic void addLifecycleListener(LookupServiceLifecycleEventListener eventListener)
LookupServicesLookupServiceLifecycleEventListener.addLifecycleListener in interface LookupServicespublic void removeLifecycleListener(LookupServiceLifecycleEventListener eventListener)
LookupServicesLookupServiceLifecycleEventListener.removeLifecycleListener in interface LookupServicespublic void addLookupService(InternalLookupService lookupService)
addLookupService in interface InternalLookupServicespublic InternalLookupService removeLookupService(String UID)
removeLookupService in interface InternalLookupServicespublic LookupServiceAddedEventManager getLookupServiceAdded()
LookupServicesLookupServiceAddedEventListeners.getLookupServiceAdded in interface LookupServicespublic LookupServiceRemovedEventManager getLookupServiceRemoved()
LookupServicesLookupServiceRemovedEventManagers.getLookupServiceRemoved in interface LookupServicespublic DumpResult generateDump(String cause, Map<String,Object> context) throws AdminException
DumpProvidergenerateDump in interface DumpProvidercause - The cause that this dump was generatedcontext - Allows to provide specific parameters to specific processorsAdminExceptionpublic DumpResult generateDump(String cause, Map<String,Object> context, String... processor) throws AdminException
DumpProvidergenerateDump in interface DumpProvidercause - The cause this dump was generated.context - Allows to provide specific parameters to specific processors.processor - The list of processors to be used.AdminExceptionCopyright © GigaSpaces.