public interface SpacePartition extends Iterable<SpaceInstance>
SpaceInstances that form the partition.| Modifier and Type | Method and Description | 
|---|---|
SpaceInstance | 
getBackup()
Returns the (first) backup space instance,  
null if currently there is no
 backup. | 
SpaceInstance[] | 
getInstances()
Returns all the space instances that form the partition. 
 | 
int | 
getPartitionId()
Returns the partition id (starting from 0). 
 | 
SpaceInstance | 
getPrimary()
Returns the primary space instance,  
null if currently there is no primary. | 
Space | 
getSpace()
Returns the Space this Space Partition is part of. 
 | 
SpaceModeChangedEventManager | 
getSpaceModeChanged()
Returns an event manager allowing to globally register for  
SpaceModeChangedEventListeners that happen on any Space partition
 currently discovered. | 
boolean | 
waitFor(SpaceMode spaceMode)
Waits (default timeout) till one of the Space partition instances has the provided space mode. 
 | 
boolean | 
waitFor(SpaceMode spaceMode,
       long timeout,
       TimeUnit timeUnit)
Waits (given timeout) till one of the Space partition instances has the provided space mode. 
 | 
forEach, iterator, spliteratorint getPartitionId()
SpaceInstance.getInstanceId()
 starts from 1.SpaceInstance[] getInstances()
Space getSpace()
SpaceInstance getPrimary()
null if currently there is no primary.SpaceInstance getBackup()
null if currently there is no
 backup.boolean waitFor(SpaceMode spaceMode)
spaceMode - the requested space mode (PRIMARY / BACKUP)true if a space instance was found in the default timeout, false otherwise.boolean waitFor(SpaceMode spaceMode, long timeout, TimeUnit timeUnit)
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 parametertrue if a space instance was found in the specified timeout, false otherwise.SpaceModeChangedEventManager getSpaceModeChanged()
SpaceModeChangedEventListeners that happen on any Space partition
 currently discovered.Copyright © GigaSpaces.