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
LookupServiceAddedEventListener s. |
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
LookupServiceRemovedEventManager s. |
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, wait
forEach, spliterator
public DefaultLookupServices(InternalAdmin admin)
public Admin getAdmin()
AdminAware
Admin
associated with this element.getAdmin
in interface AdminAware
public LookupService[] getLookupServices()
LookupServices
getLookupServices
in interface LookupServices
public Iterator<LookupService> iterator()
iterator
in interface Iterable<LookupService>
public LookupService getLookupServiceByUID(String id)
LookupServices
getLookupServiceByUID
in interface LookupServices
GridComponent.getUid()
public Map<String,LookupService> getUids()
LookupServices
getUids
in interface LookupServices
public int getSize()
LookupServices
getSize
in interface LookupServices
public boolean isEmpty()
LookupServices
true
if there are no containers, false
otherwise.isEmpty
in interface LookupServices
public boolean waitFor(int numberOfLookupServices)
LookupServices
waitFor
in interface LookupServices
numberOfLookupServices
- The number of lookup services to wait forpublic boolean waitFor(int numberOfLookupServices, long timeout, TimeUnit timeUnit)
LookupServices
true
if the required number of lookup services were discovered,
false
if the timeout expired.waitFor
in interface LookupServices
numberOfLookupServices
- The number of lookup services to wait forpublic void addLifecycleListener(LookupServiceLifecycleEventListener eventListener)
LookupServices
LookupServiceLifecycleEventListener
.addLifecycleListener
in interface LookupServices
public void removeLifecycleListener(LookupServiceLifecycleEventListener eventListener)
LookupServices
LookupServiceLifecycleEventListener
.removeLifecycleListener
in interface LookupServices
public void addLookupService(InternalLookupService lookupService)
addLookupService
in interface InternalLookupServices
public InternalLookupService removeLookupService(String UID)
removeLookupService
in interface InternalLookupServices
public LookupServiceAddedEventManager getLookupServiceAdded()
LookupServices
LookupServiceAddedEventListener
s.getLookupServiceAdded
in interface LookupServices
public LookupServiceRemovedEventManager getLookupServiceRemoved()
LookupServices
LookupServiceRemovedEventManager
s.getLookupServiceRemoved
in interface LookupServices
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
Copyright © GigaSpaces.