Package org.openspaces.admin.space
Interface Spaces
- All Superinterfaces:
AdminAware,Iterable<Space>,StatisticsMonitor
- All Known Subinterfaces:
InternalSpaces
- All Known Implementing Classes:
DefaultSpaces
Spaces holds all the currently discovered
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.
- Author:
- kimchy
-
Field Summary
Fields inherited from interface org.openspaces.admin.StatisticsMonitor
DEFAULT_HISTORY_SIZE, DEFAULT_MONITOR_INTERVAL -
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.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 discoveredvoidremoveLifecycleListener(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.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 interface org.openspaces.admin.AdminAware
getAdminMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.openspaces.admin.StatisticsMonitor
isMonitoring, setStatisticsHistorySize, setStatisticsInterval, startStatisticsMonitor, stopStatisticsMonitor
-
Method Details
-
getSpaces
Space[] getSpaces()Returns all the currently discoveredSpaces. -
getSpaceByUID
Returns a space based on its uid. -
getSpaceByName
Returns a space based on its name. -
getNames
Returns a map ofSpaces keyed by their names. -
waitFor
Waits indefinitely till the provided Space name is discovered.- Parameters:
spaceName- The space name to wait for
-
waitFor
Waits for the given timeout (in time unit) till the space name is discovered. Returnstrueif the space is discovered,falseif the timeout expired. -
getSpaceAdded
SpaceAddedEventManager getSpaceAdded()Returns an event manager allowing to addSpaceAddedEventListeners. -
getSpaceRemoved
SpaceRemovedEventManager getSpaceRemoved()Returns an event manager allowing to removeSpaceAddedEventListeners. -
addLifecycleListener
Adds aSpaceLifecycleEventListenerto be notified when aSpaceis added and removed. -
removeLifecycleListener
Removes aSpaceLifecycleEventListenerto be notified when aSpaceis added and removed. -
getSpaceInstanceAdded
SpaceInstanceAddedEventManager getSpaceInstanceAdded()Returns an event manager allowing to globally addSpaceInstanceAddedEventListenerthat will be called for any space instance discovered. -
getSpaceInstanceRemoved
SpaceInstanceRemovedEventManager getSpaceInstanceRemoved()Returns an event manager allowing to globally removeSpaceInstanceAddedEventListenerthat will be called for any space instance discovered. -
addLifecycleListener
Allows to add aSpaceInstanceLifecycleEventListenerhthat will be called for any space instance discovered. -
removeLifecycleListener
Allows to remove aSpaceInstanceLifecycleEventListenerhthat will be called for any space instance discovered. -
getSpaceModeChanged
SpaceModeChangedEventManager getSpaceModeChanged()Returns an event manager allowing to globally register forSpaceModeChangedEvents that happen on any Space instance currently discovered. -
getSpaceSuspendTypeChanged
SpaceSuspendTypeChangedEventManager getSpaceSuspendTypeChanged()Returns an event manager allowing to globally register forSpaceSuspendTypeChangedEvents that happen on any Space instance currently discovered -
getReplicationStatusChanged
ReplicationStatusChangedEventManager getReplicationStatusChanged()Returns an event manager allowing to globally register forReplicationStatusChangedEvents that happen on any Space instance currently discovered. -
getSpaceStatisticsChanged
SpaceStatisticsChangedEventManager getSpaceStatisticsChanged()Returns 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. -
getSpaceInstanceStatisticsChanged
SpaceInstanceStatisticsChangedEventManager getSpaceInstanceStatisticsChanged()Returns 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.
-