GigaSpaces XAP 7.0 API

org.openspaces.admin.lus
Interface LookupServices

All Superinterfaces:
AdminAware, Iterable<LookupService>

public interface LookupServices
extends AdminAware, Iterable<LookupService>

Lookup Services hold all the different LookupServices that are currently discovered.

Provides simple means to get all the current lus, as well as as registering for lus lifecycle (added and removed) events.

Author:
kimchy

Method Summary
 void addLifecycleListener(LookupServiceLifecycleEventListener eventListener)
          Allows to add a LookupServiceLifecycleEventListener.
 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.
 void removeLifecycleListener(LookupServiceLifecycleEventListener eventListener)
          Allows to remove a LookupServiceLifecycleEventListener.
 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.
 
Methods inherited from interface org.openspaces.admin.AdminAware
getAdmin
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getLookupServices

LookupService[] getLookupServices()
Returns all the currently discovered lus.


getLookupServiceByUID

LookupService getLookupServiceByUID(String id)
Returns a lus based on its uid.

See Also:
GridComponent.getUid()

getUids

Map<String,LookupService> getUids()
Returns a map of lookup service with the key as the uid.


getSize

int getSize()
Returns the number of lookup services current discovered.


isEmpty

boolean isEmpty()
Returns true if there are no containers, false otherwise.


waitFor

boolean waitFor(int numberOfLookupServices)
Waits indefinitely till the provided number of lookup services are up.

Parameters:
numberOfLookupServices - The number of lookup services to wait for

waitFor

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. Returns true if the required number of lookup services were discovered, false if the timeout expired.

Parameters:
numberOfLookupServices - The number of lookup services to wait for

getLookupServiceAdded

LookupServiceAddedEventManager getLookupServiceAdded()
Returns the lookup service added event manager allowing to add and remove LookupServiceAddedEventListeners.


getLookupServiceRemoved

LookupServiceRemovedEventManager getLookupServiceRemoved()
Returns the grid service container added event manager allowing to add and remove LookupServiceRemovedEventManagers.


addLifecycleListener

void addLifecycleListener(LookupServiceLifecycleEventListener eventListener)
Allows to add a LookupServiceLifecycleEventListener.


removeLifecycleListener

void removeLifecycleListener(LookupServiceLifecycleEventListener eventListener)
Allows to remove a LookupServiceLifecycleEventListener.


GigaSpaces XAP 7.0 API

Copyright © GigaSpaces.