Package org.openspaces.admin.zone
Interface Zones
- All Superinterfaces:
AdminAware,Iterable<Zone>
- All Known Subinterfaces:
InternalZones
- All Known Implementing Classes:
DefaultZones
- Author:
- kimchy
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddLifecycleListener(ZoneLifecycleEventListener eventListener) Allows to add aZoneLifecycleEventListener.Returns a discovered zone by its name.getNames()Returns a map of zone names toZones.Returns the machines added event manager allowing to add and removeZoneAddedEventListeners.Returns the grid service container added event manager allowing to add and removeZoneRemovedEventListeners.Zone[]getZones()Returns all currently discovered zones.voidremoveLifeycleListener(ZoneLifecycleEventListener eventListener) Allows to remove aZoneLifecycleEventListener.Waits indefinitely till the zone with the given name is discovered.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
getAdminMethods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getZones
Zone[] getZones()Returns all currently discovered zones. -
getByName
Returns a discovered zone by its name.- Parameters:
name- The name of the zone to match.- Returns:
- The discovered zone; or
nullif no match has yet been discovered.
-
getNames
Returns a map of zone names toZones.- Returns:
- a map holding all discovered zones.
-
getZoneAdded
ZoneAddedEventManager getZoneAdded()Returns the machines added event manager allowing to add and removeZoneAddedEventListeners. -
getZoneRemoved
ZoneRemovedEventManager getZoneRemoved()Returns the grid service container added event manager allowing to add and removeZoneRemovedEventListeners. -
addLifecycleListener
Allows to add aZoneLifecycleEventListener. -
removeLifeycleListener
Allows to remove aZoneLifecycleEventListener. -
waitFor
Waits indefinitely till the zone with the given name is discovered.- Parameters:
zoneByName- The zone name- Returns:
- The discovered zone
-
waitFor
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, ornullif the zone was not discovered.- Parameters:
zoneByName- The zone name- Returns:
- the zone if it was discovered within the provided timeout, or
nullif the zone was not discovered.
-