public class DefaultSpaces extends Object implements InternalSpaces
DEFAULT_HISTORY_SIZE, DEFAULT_MONITOR_INTERVAL| Constructor and Description | 
|---|
DefaultSpaces(InternalAdmin admin)  | 
| 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. | 
void | 
addSpace(Space space)  | 
void | 
addSpaceInstance(SpaceInstance spaceInstance)  | 
Admin | 
getAdmin()
Returns the  
Admin associated with this element. | 
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. | 
SpaceInstance[] | 
getSpaceInstances()  | 
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. | 
SpaceSuspendTypeChangedEventManager | 
getSpaceSuspendTypeChanged()
Returns an event manager allowing to globally register for  
SpaceSuspendTypeChangedEvents that happen on any Space instance
 currently discovered | 
boolean | 
isMonitoring()
Returns  
true if statistics are now being monitored. | 
Iterator<Space> | 
iterator()  | 
void | 
refreshScheduledSpaceMonitors()  | 
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. | 
InternalSpace | 
removeSpace(String uid)  | 
SpaceInstance | 
removeSpaceInstance(String uid)  | 
void | 
setStatisticsHistorySize(int historySize)
Sets the history size of number of statistics stored. 
 | 
void | 
setStatisticsInterval(long interval,
                     TimeUnit timeUnit)
Sets the statistics interval, automatically updating the monitoring scheduled tasks if
 monitoring is enabled. 
 | 
void | 
startStatisticsMonitor()
Starts the statistics monitor, starting a scheduled monitor that polls for statistics. 
 | 
void | 
stopStatisticsMonitor()
Stops the statistics monitor. 
 | 
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. 
 | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic DefaultSpaces(InternalAdmin admin)
public Admin getAdmin()
AdminAwareAdmin associated with this element.getAdmin in interface AdminAwarepublic void setStatisticsInterval(long interval,
                                  TimeUnit timeUnit)
StatisticsMonitorsetStatisticsInterval in interface StatisticsMonitorpublic void setStatisticsHistorySize(int historySize)
StatisticsMonitorsetStatisticsHistorySize in interface StatisticsMonitorpublic void startStatisticsMonitor()
StatisticsMonitorstartStatisticsMonitor in interface StatisticsMonitorpublic void stopStatisticsMonitor()
StatisticsMonitorstopStatisticsMonitor in interface StatisticsMonitorpublic boolean isMonitoring()
StatisticsMonitortrue if statistics are now being monitored.isMonitoring in interface StatisticsMonitorpublic Space[] getSpaces()
SpacesSpaces.public Space getSpaceByUID(String uid)
SpacesgetSpaceByUID in interface Spacespublic Space getSpaceByName(String name)
SpacesgetSpaceByName in interface Spacespublic Map<String,Space> getNames()
SpacesSpaces keyed by their names.public SpaceAddedEventManager getSpaceAdded()
SpacesSpaceAddedEventListeners.getSpaceAdded in interface Spacespublic SpaceRemovedEventManager getSpaceRemoved()
SpacesSpaceAddedEventListeners.getSpaceRemoved in interface Spacespublic SpaceStatisticsChangedEventManager getSpaceStatisticsChanged()
SpacesSpaceStatisticsChangedEvents
 that occur on all the currently discovered Spaces.
 Note, StatisticsMonitor.startStatisticsMonitor() must be called in order to start monitor
 statistics.
getSpaceStatisticsChanged in interface Spacespublic SpaceInstanceStatisticsChangedEventManager getSpaceInstanceStatisticsChanged()
SpacesSpaceInstanceStatisticsChangedEvents
 that occur on all the currently discovered SpaceInstances.
 Note, StatisticsMonitor.startStatisticsMonitor() must be called in order to start monitoring
 statistics.
getSpaceInstanceStatisticsChanged in interface Spacespublic Space waitFor(String spaceName)
Spacespublic Space waitFor(String spaceName, long timeout, TimeUnit timeUnit)
Spacestrue if the space is discovered, false if the timeout expired.public void addLifecycleListener(SpaceLifecycleEventListener eventListener)
SpacesSpaceLifecycleEventListener to be notified
 when a Space is added and removed.addLifecycleListener in interface Spacespublic void removeLifecycleListener(SpaceLifecycleEventListener eventListener)
SpacesSpaceLifecycleEventListener to be
 notified when a Space is added and removed.removeLifecycleListener in interface Spacespublic SpaceModeChangedEventManager getSpaceModeChanged()
SpacesSpaceModeChangedEvents that happen on any Space instance
 currently discovered.getSpaceModeChanged in interface Spacespublic SpaceSuspendTypeChangedEventManager getSpaceSuspendTypeChanged()
SpacesSpaceSuspendTypeChangedEvents that happen on any Space instance
 currently discoveredgetSpaceSuspendTypeChanged in interface Spacespublic ReplicationStatusChangedEventManager getReplicationStatusChanged()
SpacesReplicationStatusChangedEvents that happen on any Space
 instance currently discovered.getReplicationStatusChanged in interface Spacespublic SpaceInstance[] getSpaceInstances()
getSpaceInstances in interface InternalSpaceInstancesAwarepublic SpaceInstanceAddedEventManager getSpaceInstanceAdded()
SpacesSpaceInstanceAddedEventListener
 that will be called for any space instance discovered.getSpaceInstanceAdded in interface Spacespublic SpaceInstanceRemovedEventManager getSpaceInstanceRemoved()
SpacesSpaceInstanceAddedEventListener
 that will be called for any space instance discovered.getSpaceInstanceRemoved in interface Spacespublic void addLifecycleListener(SpaceInstanceLifecycleEventListener eventListener)
SpacesSpaceInstanceLifecycleEventListener
 hthat will be called for any space instance discovered.addLifecycleListener in interface Spacespublic void removeLifecycleListener(SpaceInstanceLifecycleEventListener eventListener)
SpacesSpaceInstanceLifecycleEventListener
 hthat will be called for any space instance discovered.removeLifecycleListener in interface Spacespublic void addSpace(Space space)
addSpace in interface InternalSpacespublic InternalSpace removeSpace(String uid)
removeSpace in interface InternalSpacespublic void addSpaceInstance(SpaceInstance spaceInstance)
addSpaceInstance in interface InternalSpacespublic SpaceInstance removeSpaceInstance(String uid)
removeSpaceInstance in interface InternalSpacespublic void refreshScheduledSpaceMonitors()
refreshScheduledSpaceMonitors in interface InternalSpacesCopyright © GigaSpaces.