GigaSpaces XAP 10.0.1 API

org.openspaces.admin.zone
Interface Zones

All Superinterfaces:
AdminAware, Iterable<Zone>

public interface Zones
extends AdminAware, Iterable<Zone>

Author:
kimchy

Method Summary
 void addLifecycleListener(ZoneLifecycleEventListener eventListener)
          Allows to add a ZoneLifecycleEventListener.
 Zone getByName(String name)
          Returns a discovered zone by its name.
 Map<String,Zone> getNames()
          Returns a map of zone names to Zones.
 ZoneAddedEventManager getZoneAdded()
          Returns the machines added event manager allowing to add and remove ZoneAddedEventListeners.
 ZoneRemovedEventManager getZoneRemoved()
          Returns the grid service container added event manager allowing to add and remove ZoneRemovedEventListeners.
 Zone[] getZones()
          Returns all currently discovered zones.
 void removeLifeycleListener(ZoneLifecycleEventListener eventListener)
          Allows to remove a ZoneLifecycleEventListener.
 Zone waitFor(String zoneByName)
          Waits indefinitely till the zone with the given name is discovered.
 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.
 
Methods inherited from interface org.openspaces.admin.AdminAware
getAdmin
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

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)
Allows to add a ZoneLifecycleEventListener.


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.

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.