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, wait
forEach, spliterator
public DefaultSpacePartition(Space space, int partitionId)
public Space getSpace()
SpacePartition
getSpace
in interface SpacePartition
public SpaceInstance getPrimary()
SpacePartition
null
if currently there is no primary.getPrimary
in interface SpacePartition
public SpaceInstance getBackup()
SpacePartition
null
if currently there is no
backup.getBackup
in interface SpacePartition
public Iterator<SpaceInstance> iterator()
iterator
in interface Iterable<SpaceInstance>
public SpaceInstance[] getInstances()
SpacePartition
getInstances
in interface SpacePartition
public int getPartitionId()
SpacePartition
SpaceInstance.getInstanceId()
starts from 1.getPartitionId
in interface SpacePartition
public void addSpaceInstance(SpaceInstance spaceInstance)
addSpaceInstance
in interface InternalSpacePartition
public void removeSpaceInstance(String uid)
removeSpaceInstance
in interface InternalSpacePartition
Copyright © GigaSpaces.