Interface Zones

All Superinterfaces:
AdminAware, Iterable<Zone>
All Known Subinterfaces:
InternalZones
All Known Implementing Classes:
DefaultZones

public interface Zones extends AdminAware, Iterable<Zone>
Author:
kimchy
  • Method Details

    • getZones

      Zone[] getZones()
      Returns all currently discovered zones.
    • getByName

      Zone getByName(String name)
      Returns a discovered zone by its name.
      Parameters:
      name - The name of the zone to match.
      Returns:
      The discovered zone; or null if no match has yet been discovered.
    • getNames

      Map<String,Zone> getNames()
      Returns a map of zone names to Zones.
      Returns:
      a map holding all discovered zones.
    • getZoneAdded

      ZoneAddedEventManager getZoneAdded()
      Returns the machines added event manager allowing to add and remove ZoneAddedEventListeners.
    • getZoneRemoved

      ZoneRemovedEventManager getZoneRemoved()
      Returns the grid service container added event manager allowing to add and remove ZoneRemovedEventListeners.
    • addLifecycleListener

      void addLifecycleListener(ZoneLifecycleEventListener eventListener)
    • removeLifeycleListener

      void removeLifeycleListener(ZoneLifecycleEventListener eventListener)
      Allows to remove a ZoneLifecycleEventListener.
    • waitFor

      Zone waitFor(String zoneByName)
      Waits indefinitely till the zone with the given name is discovered.
      Parameters:
      zoneByName - The zone name
      Returns:
      The discovered zone
    • waitFor

      Zone waitFor(String zoneByName, long timeout, TimeUnit timeUnit)
      Waits for the given timeout (in time unit) till the zone with the given name is discovered. Returns the zone if it was discovered within the provided timeout, or null if the zone was not discovered.
      Parameters:
      zoneByName - The zone name
      Returns:
      the zone if it was discovered within the provided timeout, or null if the zone was not discovered.