public class DefaultSpacePartition extends Object implements InternalSpacePartition
| Constructor and Description |
|---|
DefaultSpacePartition(Space space,
int partitionId) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSpaceInstance(SpaceInstance spaceInstance) |
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.
|
Iterator<SpaceInstance> |
iterator() |
void |
removeSpaceInstance(String uid) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic DefaultSpacePartition(Space space, int partitionId)
public Space getSpace()
SpacePartitiongetSpace in interface SpacePartitionpublic SpaceInstance getPrimary()
SpacePartitionnull if currently there is no primary.getPrimary in interface SpacePartitionpublic SpaceInstance getBackup()
SpacePartitionnull if currently there is no
backup.getBackup in interface SpacePartitionpublic Iterator<SpaceInstance> iterator()
iterator in interface Iterable<SpaceInstance>public SpaceInstance[] getInstances()
SpacePartitiongetInstances in interface SpacePartitionpublic int getPartitionId()
SpacePartitionSpaceInstance.getInstanceId()
starts from 1.getPartitionId in interface SpacePartitionpublic void addSpaceInstance(SpaceInstance spaceInstance)
addSpaceInstance in interface InternalSpacePartitionpublic void removeSpaceInstance(String uid)
removeSpaceInstance in interface InternalSpacePartitionCopyright © GigaSpaces.