Package org.openspaces.admin.space
Interface SpacePartition
- All Superinterfaces:
Iterable<SpaceInstance>
- All Known Subinterfaces:
InternalSpacePartition
- All Known Implementing Classes:
DefaultSpacePartition
A Space partition mainly make sense with partitioned topologies and holds all the
SpaceInstances that form the partition.- Author:
- kimchy
-
Method Summary
Modifier and TypeMethodDescriptionReturns the (first) backup space instance,nullif currently there is no backup.Returns all the space instances that form the partition.intReturns the partition id (starting from 0).Returns the primary space instance,nullif currently there is no primary.getSpace()Returns the Space this Space Partition is part of.Returns an event manager allowing to globally register forSpaceModeChangedEventListeners that happen on any Space partition currently discovered.booleanWaits (default timeout) till one of the Space partition instances has the provided space mode.booleanWaits (given timeout) till one of the Space partition instances has the provided space mode.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getPartitionId
int getPartitionId()Returns the partition id (starting from 0). Note,SpaceInstance.getInstanceId()starts from 1. -
getInstances
SpaceInstance[] getInstances()Returns all the space instances that form the partition. -
getSpace
Space getSpace()Returns the Space this Space Partition is part of. -
getPrimary
SpaceInstance getPrimary()Returns the primary space instance,nullif currently there is no primary. -
getBackup
SpaceInstance getBackup()Returns the (first) backup space instance,nullif currently there is no backup. -
waitFor
Waits (default timeout) till one of the Space partition instances has the provided space mode.- Parameters:
spaceMode- the requested space mode (PRIMARY / BACKUP)- Returns:
- returns
trueif a space instance was found in the default timeout,falseotherwise. - Since:
- 14.5
-
waitFor
Waits (given timeout) till one of the Space partition instances has the provided space mode.- Parameters:
spaceMode- the requested space mode (PRIMARY / BACKUP)timeout- the time to wait based on the time unittimeUnit- the time unit to use for the timeout parameter- Returns:
- returns
trueif a space instance was found in the specified timeout,falseotherwise. - Since:
- 14.5
-
getSpaceModeChanged
SpaceModeChangedEventManager getSpaceModeChanged()Returns an event manager allowing to globally register forSpaceModeChangedEventListeners that happen on any Space partition currently discovered.
-