|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Space
A space is composed of several SpaceInstance
s the form a
topology.
There are two main logical of topologies, one that has backups to each space instance, and
one that is without backups. For example, a partitioned topology of 2 partitions, each with one
backup will return 2 for getNumberOfInstances()
and 1 for getNumberOfBackups()
.
A replicated topology of 4 will return 4 for getNumberOfInstances()
and 0 for
getNumberOfBackups()
.
A Space will be discovered once one of its SpaceInstance
have been discovered. It will be removed once there are no SpaceInstance
s
running.
Provides the ability to start a statistics monitor on all current SpaceInstance
s using
StatisticsMonitor.startStatisticsMonitor()
. Newly discovered space instances will automatically use
the statistics monitor as well.
Field Summary |
---|
Fields inherited from interface org.openspaces.admin.StatisticsMonitor |
---|
DEFAULT_HISTORY_SIZE, DEFAULT_MONITOR_INTERVAL |
Method Summary | |
---|---|
void |
addLifecycleListener(SpaceInstanceLifecycleEventListener eventListener)
Allows to add SpaceInstanceLifecycleEventListener . |
SpaceStatistics |
getBackupsStatistics()
Returns an aggregated view of all the statistics of the backup instances. |
GigaSpace |
getGigaSpace()
Returns the clustered view of the space to operate on. |
SpaceInstance[] |
getInstances()
Returns all the space instances that are currently discovered that are part of this Space topology. |
SpaceInstanceStatisticsChangedEventManager |
getInstanceStatisticsChanged()
Allows to register for space instance level statistics SpaceInstanceStatisticsChangedEvent s. |
String |
getName()
Returns the name of the Space. |
int |
getNumberOfBackups()
Returns the number of backups per Space Instance. |
int |
getNumberOfInstances()
Returns the number of instances as per the Space topology. |
SpacePartition |
getPartition(int partitionId)
Returns a partition for a specific partition id. |
SpacePartition[] |
getPartitions()
Returns all the partitions that form this Space topology. |
SpaceStatistics |
getPrimariesStatistics()
Returns an aggregated view of all the statistics of the primary instances. |
ReplicationStatusChangedEventManager |
getReplicationStatusChanged()
Allows to globally register for each SpaceInstance
ReplicationStatusChangedEvent . |
int |
getSize()
Returns the number of currently discovered space instances. |
SpaceInstanceAddedEventManager |
getSpaceInstanceAdded()
Allows to registered SpaceInstanceAddedEventListener to be notified
when space instances are added. |
SpaceInstanceRemovedEventManager |
getSpaceInstanceRemoved()
Allows to registered SpaceInstanceRemovedEventListener to be notified
when space instances are removed. |
SpaceModeChangedEventManager |
getSpaceModeChanged()
Allows to globally regsiter for each SpaceInstance
SpaceModeChangedEvent . |
Spaces |
getSpaces()
Returns the spaces this space is one of. |
SpaceStatistics |
getStatistics()
Returns an aggregated view of all the statistics of all the instances. |
SpaceStatisticsChangedEventManager |
getStatisticsChanged()
Allows to register for aggregated Space level statistics SpaceStatisticsChangedEvent . |
int |
getTotalNumberOfInstances()
Returns the total number of instances. |
String |
getUid()
Returns the uid of the Space. |
boolean |
isEmpty()
Returns true if there are currently no space instances discovered. |
void |
removeLifecycleListener(SpaceInstanceLifecycleEventListener eventListener)
Allows to remove SpaceInstanceLifecycleEventListener . |
boolean |
waitFor(int numberOfSpaceInstances)
Waits till at least the provided number of Space Instances are up. |
boolean |
waitFor(int numberOfSpaceInstances,
long timeout,
TimeUnit timeUnit)
Waits till at least the provided number of Space Instances are up for the specified timeout. |
boolean |
waitFor(int numberOfSpaceInstances,
com.gigaspaces.cluster.activeelection.SpaceMode spaceMode)
Waits till at least the provided number of Space Instances that are of the space mode type are up. |
boolean |
waitFor(int numberOfSpaceInstances,
com.gigaspaces.cluster.activeelection.SpaceMode spaceMode,
long timeout,
TimeUnit timeUnit)
Waits till at least the provided number of Space Instances are of the space mode type are up for the specified timeout. |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Methods inherited from interface org.openspaces.admin.StatisticsMonitor |
---|
isMonitoring, setStatisticsHistorySize, setStatisticsInterval, startStatisticsMonitor, stopStatisticsMontior |
Method Detail |
---|
Spaces getSpaces()
String getUid()
String getName()
int getNumberOfInstances()
int getNumberOfBackups()
int getTotalNumberOfInstances()
getNumberOfInstances()
. If there are backups, will return getNumberOfInstances()
* (getNumberOfBackups()
+ 1)
SpaceInstance[] getInstances()
SpacePartition[] getPartitions()
SpacePartition getPartition(int partitionId)
int getSize()
boolean isEmpty()
true
if there are currently no space instances discovered.
GigaSpace getGigaSpace()
boolean waitFor(int numberOfSpaceInstances)
boolean waitFor(int numberOfSpaceInstances, long timeout, TimeUnit timeUnit)
boolean waitFor(int numberOfSpaceInstances, com.gigaspaces.cluster.activeelection.SpaceMode spaceMode)
boolean waitFor(int numberOfSpaceInstances, com.gigaspaces.cluster.activeelection.SpaceMode spaceMode, long timeout, TimeUnit timeUnit)
SpaceStatistics getStatistics()
SpaceStatistics getPrimariesStatistics()
SpaceStatistics getBackupsStatistics()
SpaceInstanceAddedEventManager getSpaceInstanceAdded()
SpaceInstanceAddedEventListener
to be notified
when space instances are added.
SpaceInstanceRemovedEventManager getSpaceInstanceRemoved()
SpaceInstanceRemovedEventListener
to be notified
when space instances are removed.
void addLifecycleListener(SpaceInstanceLifecycleEventListener eventListener)
SpaceInstanceLifecycleEventListener
.
void removeLifecycleListener(SpaceInstanceLifecycleEventListener eventListener)
SpaceInstanceLifecycleEventListener
.
SpaceModeChangedEventManager getSpaceModeChanged()
SpaceInstance
SpaceModeChangedEvent
.
ReplicationStatusChangedEventManager getReplicationStatusChanged()
SpaceInstance
ReplicationStatusChangedEvent
.
SpaceStatisticsChangedEventManager getStatisticsChanged()
SpaceStatisticsChangedEvent
.
Note, statistics monitoring must be started using StatisticsMonitor.startStatisticsMonitor()
in order to receive
events.
SpaceInstanceStatisticsChangedEventManager getInstanceStatisticsChanged()
SpaceInstanceStatisticsChangedEvent
s.
Note, statistics monitoring must be started using StatisticsMonitor.startStatisticsMonitor()
in order to receive
events.
|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |