Class DefaultZones

java.lang.Object
org.openspaces.admin.internal.zone.DefaultZones
All Implemented Interfaces:
Iterable<Zone>, AdminAware, InternalZones, Zones

public class DefaultZones extends Object implements InternalZones
Author:
kimchy
  • Constructor Details

  • Method Details

    • getZones

      public Zone[] getZones()
      Description copied from interface: Zones
      Returns all currently discovered zones.
      Specified by:
      getZones in interface Zones
    • getByName

      public Zone getByName(String name)
      Description copied from interface: Zones
      Returns a discovered zone by its name.
      Specified by:
      getByName in interface Zones
      Parameters:
      name - The name of the zone to match.
      Returns:
      The discovered zone; or null if no match has yet been discovered.
    • getNames

      public Map<String,Zone> getNames()
      Description copied from interface: Zones
      Returns a map of zone names to Zones.
      Specified by:
      getNames in interface Zones
      Returns:
      a map holding all discovered zones.
    • getAdmin

      public Admin getAdmin()
      Description copied from interface: AdminAware
      Returns the Admin associated with this element.
      Specified by:
      getAdmin in interface AdminAware
    • iterator

      public Iterator<Zone> iterator()
      Specified by:
      iterator in interface Iterable<Zone>
    • getZoneAdded

      public ZoneAddedEventManager getZoneAdded()
      Description copied from interface: Zones
      Returns the machines added event manager allowing to add and remove ZoneAddedEventListeners.
      Specified by:
      getZoneAdded in interface Zones
    • getZoneRemoved

      public ZoneRemovedEventManager getZoneRemoved()
      Description copied from interface: Zones
      Returns the grid service container added event manager allowing to add and remove ZoneRemovedEventListeners.
      Specified by:
      getZoneRemoved in interface Zones
    • addLifecycleListener

      public void addLifecycleListener(ZoneLifecycleEventListener eventListener)
      Description copied from interface: Zones
      Specified by:
      addLifecycleListener in interface Zones
    • removeLifeycleListener

      public void removeLifeycleListener(ZoneLifecycleEventListener eventListener)
      Description copied from interface: Zones
      Allows to remove a ZoneLifecycleEventListener.
      Specified by:
      removeLifeycleListener in interface Zones
    • addZone

      public void addZone(InternalZone zone, String zoneUidProvider)
      Specified by:
      addZone in interface InternalZones
    • removeProvider

      public void removeProvider(Zone zone, String zoneUidProvider)
      Specified by:
      removeProvider in interface InternalZones
    • waitFor

      public Zone waitFor(String zoneByName)
      Description copied from interface: Zones
      Waits indefinitely till the zone with the given name is discovered.
      Specified by:
      waitFor in interface Zones
      Parameters:
      zoneByName - The zone name
      Returns:
      The discovered zone
    • waitFor

      public Zone waitFor(String zoneByName, long timeout, TimeUnit timeUnit)
      Description copied from interface: Zones
      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.
      Specified by:
      waitFor in interface Zones
      Parameters:
      zoneByName - The zone name
      Returns:
      the zone if it was discovered within the provided timeout, or null if the zone was not discovered.