Class DefaultSpaces
java.lang.Object
org.openspaces.admin.internal.space.DefaultSpaces
- All Implemented Interfaces:
Iterable<Space>,AdminAware,InternalSpaceInstancesAware,InternalSpaces,Spaces,StatisticsMonitor
- Author:
- kimchy
-
Field Summary
Fields inherited from interface org.openspaces.admin.StatisticsMonitor
DEFAULT_HISTORY_SIZE, DEFAULT_MONITOR_INTERVAL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLifecycleListener(SpaceInstanceLifecycleEventListener eventListener) Allows to add aSpaceInstanceLifecycleEventListenerhthat will be called for any space instance discovered.voidaddLifecycleListener(SpaceLifecycleEventListener eventListener) Adds aSpaceLifecycleEventListenerto be notified when aSpaceis added and removed.voidvoidaddSpaceInstance(SpaceInstance spaceInstance) getAdmin()Returns theAdminassociated with this element.getNames()Returns a map ofSpaces keyed by their names.Returns an event manager allowing to globally register forReplicationStatusChangedEvents that happen on any Space instance currently discovered.Returns an event manager allowing to addSpaceAddedEventListeners.getSpaceByName(String name) Returns a space based on its name.getSpaceByUID(String uid) Returns a space based on its uid.Returns an event manager allowing to globally addSpaceInstanceAddedEventListenerthat will be called for any space instance discovered.Returns an event manager allowing to globally removeSpaceInstanceAddedEventListenerthat will be called for any space instance discovered.Returns an event manager allowing to register forSpaceInstanceStatisticsChangedEvents that occur on all the currently discoveredSpaceInstances.Returns an event manager allowing to globally register forSpaceModeChangedEvents that happen on any Space instance currently discovered.Returns an event manager allowing to removeSpaceAddedEventListeners.Space[]Returns all the currently discoveredSpaces.Returns an event manager allowing to register forSpaceStatisticsChangedEvents that occur on all the currently discoveredSpaces.Returns an event manager allowing to globally register forSpaceSuspendTypeChangedEvents that happen on any Space instance currently discoveredbooleanReturnstrueif statistics are now being monitored.iterator()voidvoidremoveLifecycleListener(SpaceInstanceLifecycleEventListener eventListener) Allows to remove aSpaceInstanceLifecycleEventListenerhthat will be called for any space instance discovered.voidremoveLifecycleListener(SpaceLifecycleEventListener eventListener) Removes aSpaceLifecycleEventListenerto be notified when aSpaceis added and removed.removeSpace(String uid) voidsetStatisticsHistorySize(int historySize) Sets the history size of number of statistics stored.voidsetStatisticsInterval(long interval, TimeUnit timeUnit) Sets the statistics interval, automatically updating the monitoring scheduled tasks if monitoring is enabled.voidStarts the statistics monitor, starting a scheduled monitor that polls for statistics.voidStops the statistics monitor.Waits indefinitely till the provided Space name is discovered.Waits for the given timeout (in time unit) till the space name is discovered.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DefaultSpaces
-
-
Method Details
-
getAdmin
Description copied from interface:AdminAwareReturns theAdminassociated with this element.- Specified by:
getAdminin interfaceAdminAware
-
setStatisticsInterval
Description copied from interface:StatisticsMonitorSets the statistics interval, automatically updating the monitoring scheduled tasks if monitoring is enabled.- Specified by:
setStatisticsIntervalin interfaceStatisticsMonitor
-
setStatisticsHistorySize
public void setStatisticsHistorySize(int historySize) Description copied from interface:StatisticsMonitorSets the history size of number of statistics stored.- Specified by:
setStatisticsHistorySizein interfaceStatisticsMonitor
-
startStatisticsMonitor
public void startStatisticsMonitor()Description copied from interface:StatisticsMonitorStarts the statistics monitor, starting a scheduled monitor that polls for statistics. Monitoring is required only when wanting to receive statistics change events.- Specified by:
startStatisticsMonitorin interfaceStatisticsMonitor
-
stopStatisticsMonitor
public void stopStatisticsMonitor()Description copied from interface:StatisticsMonitorStops the statistics monitor.- Specified by:
stopStatisticsMonitorin interfaceStatisticsMonitor
-
isMonitoring
public boolean isMonitoring()Description copied from interface:StatisticsMonitorReturnstrueif statistics are now being monitored.- Specified by:
isMonitoringin interfaceStatisticsMonitor
-
getSpaces
Description copied from interface:SpacesReturns all the currently discoveredSpaces. -
getSpaceByUID
Description copied from interface:SpacesReturns a space based on its uid.- Specified by:
getSpaceByUIDin interfaceSpaces
-
getSpaceByName
Description copied from interface:SpacesReturns a space based on its name.- Specified by:
getSpaceByNamein interfaceSpaces
-
getNames
Description copied from interface:SpacesReturns a map ofSpaces keyed by their names. -
iterator
-
getSpaceAdded
Description copied from interface:SpacesReturns an event manager allowing to addSpaceAddedEventListeners.- Specified by:
getSpaceAddedin interfaceSpaces
-
getSpaceRemoved
Description copied from interface:SpacesReturns an event manager allowing to removeSpaceAddedEventListeners.- Specified by:
getSpaceRemovedin interfaceSpaces
-
getSpaceStatisticsChanged
Description copied from interface:SpacesReturns an event manager allowing to register forSpaceStatisticsChangedEvents that occur on all the currently discoveredSpaces.Note,
StatisticsMonitor.startStatisticsMonitor()must be called in order to start monitor statistics.- Specified by:
getSpaceStatisticsChangedin interfaceSpaces
-
getSpaceInstanceStatisticsChanged
Description copied from interface:SpacesReturns an event manager allowing to register forSpaceInstanceStatisticsChangedEvents that occur on all the currently discoveredSpaceInstances.Note,
StatisticsMonitor.startStatisticsMonitor()must be called in order to start monitoring statistics.- Specified by:
getSpaceInstanceStatisticsChangedin interfaceSpaces
-
waitFor
Description copied from interface:SpacesWaits indefinitely till the provided Space name is discovered. -
waitFor
Description copied from interface:SpacesWaits for the given timeout (in time unit) till the space name is discovered. Returnstrueif the space is discovered,falseif the timeout expired. -
addLifecycleListener
Description copied from interface:SpacesAdds aSpaceLifecycleEventListenerto be notified when aSpaceis added and removed.- Specified by:
addLifecycleListenerin interfaceSpaces
-
removeLifecycleListener
Description copied from interface:SpacesRemoves aSpaceLifecycleEventListenerto be notified when aSpaceis added and removed.- Specified by:
removeLifecycleListenerin interfaceSpaces
-
getSpaceModeChanged
Description copied from interface:SpacesReturns an event manager allowing to globally register forSpaceModeChangedEvents that happen on any Space instance currently discovered.- Specified by:
getSpaceModeChangedin interfaceSpaces
-
getSpaceSuspendTypeChanged
Description copied from interface:SpacesReturns an event manager allowing to globally register forSpaceSuspendTypeChangedEvents that happen on any Space instance currently discovered- Specified by:
getSpaceSuspendTypeChangedin interfaceSpaces
-
getReplicationStatusChanged
Description copied from interface:SpacesReturns an event manager allowing to globally register forReplicationStatusChangedEvents that happen on any Space instance currently discovered.- Specified by:
getReplicationStatusChangedin interfaceSpaces
-
getSpaceInstances
- Specified by:
getSpaceInstancesin interfaceInternalSpaceInstancesAware
-
getSpaceInstanceAdded
Description copied from interface:SpacesReturns an event manager allowing to globally addSpaceInstanceAddedEventListenerthat will be called for any space instance discovered.- Specified by:
getSpaceInstanceAddedin interfaceSpaces
-
getSpaceInstanceRemoved
Description copied from interface:SpacesReturns an event manager allowing to globally removeSpaceInstanceAddedEventListenerthat will be called for any space instance discovered.- Specified by:
getSpaceInstanceRemovedin interfaceSpaces
-
addLifecycleListener
Description copied from interface:SpacesAllows to add aSpaceInstanceLifecycleEventListenerhthat will be called for any space instance discovered.- Specified by:
addLifecycleListenerin interfaceSpaces
-
removeLifecycleListener
Description copied from interface:SpacesAllows to remove aSpaceInstanceLifecycleEventListenerhthat will be called for any space instance discovered.- Specified by:
removeLifecycleListenerin interfaceSpaces
-
addSpace
- Specified by:
addSpacein interfaceInternalSpaces
-
removeSpace
- Specified by:
removeSpacein interfaceInternalSpaces
-
addSpaceInstance
- Specified by:
addSpaceInstancein interfaceInternalSpaces
-
removeSpaceInstance
- Specified by:
removeSpaceInstancein interfaceInternalSpaces
-
refreshScheduledSpaceMonitors
public void refreshScheduledSpaceMonitors()- Specified by:
refreshScheduledSpaceMonitorsin interfaceInternalSpaces
-