Interface LookupServices

All Superinterfaces:
AdminAware, DumpProvider, Iterable<LookupService>
All Known Subinterfaces:
InternalLookupServices
All Known Implementing Classes:
DefaultLookupServices

public interface LookupServices extends AdminAware, Iterable<LookupService>, DumpProvider
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 Details

    • getLookupServices

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

      LookupService getLookupServiceByUID(String id)
      Returns a lus based on its uid.
      See Also:
    • 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)
    • removeLifecycleListener

      void removeLifecycleListener(LookupServiceLifecycleEventListener eventListener)