public interface Spaces extends Iterable<Space>, AdminAware, StatisticsMonitor
Spaces.
 Provides simple means to get all the current Space, as well as as registering for Space lifecycle (added and removed) events.
Provides the ability to start a statistics monitor on all current Space using
 StatisticsMonitor.startStatisticsMonitor(). Newly discovered Space will automatically use
 the statistics monitor as well.
DEFAULT_HISTORY_SIZE, DEFAULT_MONITOR_INTERVAL| Modifier and Type | Method and Description | 
|---|---|
void | 
addLifecycleListener(SpaceInstanceLifecycleEventListener eventListener)
Allows to add a  
SpaceInstanceLifecycleEventListener hthat will be called
 for any space instance discovered. | 
void | 
addLifecycleListener(SpaceLifecycleEventListener eventListener)
Adds a  
SpaceLifecycleEventListener to be notified
 when a Space is added and removed. | 
Map<String,Space> | 
getNames()
Returns a map of  
Spaces keyed by their names. | 
ReplicationStatusChangedEventManager | 
getReplicationStatusChanged()
Returns an event manager allowing to globally register for  
ReplicationStatusChangedEvents
 that happen on any Space instance currently discovered. | 
SpaceAddedEventManager | 
getSpaceAdded()
Returns an event manager allowing to add  
SpaceAddedEventListeners. | 
Space | 
getSpaceByName(String name)
Returns a space based on its name. 
 | 
Space | 
getSpaceByUID(String uid)
Returns a space based on its uid. 
 | 
SpaceInstanceAddedEventManager | 
getSpaceInstanceAdded()
Returns an event manager allowing to globally add  
SpaceInstanceAddedEventListener
 that will be called for any space instance discovered. | 
SpaceInstanceRemovedEventManager | 
getSpaceInstanceRemoved()
Returns an event manager allowing to globally remove  
SpaceInstanceAddedEventListener
 that will be called for any space instance discovered. | 
SpaceInstanceStatisticsChangedEventManager | 
getSpaceInstanceStatisticsChanged()
Returns an event manager allowing to register for  
SpaceInstanceStatisticsChangedEvents
 that occur on all the currently discovered SpaceInstances. | 
SpaceModeChangedEventManager | 
getSpaceModeChanged()
Returns an event manager allowing to globally register for  
SpaceModeChangedEvents
 that happen on any Space instance currently discovered. | 
SpaceRemovedEventManager | 
getSpaceRemoved()
Returns an event manager allowing to remove  
SpaceAddedEventListeners. | 
Space[] | 
getSpaces()
Returns all the currently discovered  
Spaces. | 
SpaceStatisticsChangedEventManager | 
getSpaceStatisticsChanged()
Returns an event manager allowing to register for  
SpaceStatisticsChangedEvents
 that occur on all the currently discovered Spaces. | 
void | 
removeLifecycleListener(SpaceInstanceLifecycleEventListener eventListener)
Allows to remove a  
SpaceInstanceLifecycleEventListener hthat will be called
 for any space instance discovered. | 
void | 
removeLifecycleListener(SpaceLifecycleEventListener eventListener)
Removes a  
SpaceLifecycleEventListener to be notified
 when a Space is added and removed. | 
Space | 
waitFor(String spaceName)
Waits indefinitely till the provided Space name is discovered. 
 | 
Space | 
waitFor(String spaceName,
       long timeout,
       TimeUnit timeUnit)
Waits for the given timeout (in time unit) till the space name is discovered. 
 | 
forEach, iterator, spliteratorgetAdminisMonitoring, setStatisticsHistorySize, setStatisticsInterval, startStatisticsMonitor, stopStatisticsMonitorSpace waitFor(String spaceName)
spaceName - The space name to wait forSpace waitFor(String spaceName, long timeout, TimeUnit timeUnit)
true if the space is discovered, false
 if the timeout expired.SpaceAddedEventManager getSpaceAdded()
SpaceAddedEventListeners.SpaceRemovedEventManager getSpaceRemoved()
SpaceAddedEventListeners.void addLifecycleListener(SpaceLifecycleEventListener eventListener)
SpaceLifecycleEventListener to be notified
 when a Space is added and removed.void removeLifecycleListener(SpaceLifecycleEventListener eventListener)
SpaceLifecycleEventListener to be notified
 when a Space is added and removed.SpaceInstanceAddedEventManager getSpaceInstanceAdded()
SpaceInstanceAddedEventListener
 that will be called for any space instance discovered.SpaceInstanceRemovedEventManager getSpaceInstanceRemoved()
SpaceInstanceAddedEventListener
 that will be called for any space instance discovered.void addLifecycleListener(SpaceInstanceLifecycleEventListener eventListener)
SpaceInstanceLifecycleEventListener hthat will be called
 for any space instance discovered.void removeLifecycleListener(SpaceInstanceLifecycleEventListener eventListener)
SpaceInstanceLifecycleEventListener hthat will be called
 for any space instance discovered.SpaceModeChangedEventManager getSpaceModeChanged()
SpaceModeChangedEvents
 that happen on any Space instance currently discovered.ReplicationStatusChangedEventManager getReplicationStatusChanged()
ReplicationStatusChangedEvents
 that happen on any Space instance currently discovered.SpaceStatisticsChangedEventManager getSpaceStatisticsChanged()
SpaceStatisticsChangedEvents
 that occur on all the currently discovered Spaces.
 Note, StatisticsMonitor.startStatisticsMonitor() must be called in order to start monitor statistics.
SpaceInstanceStatisticsChangedEventManager getSpaceInstanceStatisticsChanged()
SpaceInstanceStatisticsChangedEvents
 that occur on all the currently discovered SpaceInstances.
 Note, StatisticsMonitor.startStatisticsMonitor() must be called in order to start monitoring statistics.
Copyright © GigaSpaces.