public class DefaultProcessingUnitPartition extends Object implements InternalProcessingUnitPartition
Constructor and Description |
---|
DefaultProcessingUnitPartition(ProcessingUnit processingUnit,
int patitionId) |
Modifier and Type | Method and Description |
---|---|
void |
addProcessingUnitInstance(ProcessingUnitInstance processingUnitInstance) |
ProcessingUnitInstance |
getBackup()
If the processing unit has an embedded space, will return the processing unit instance that
holds a the backup space instance.
|
ProcessingUnitInstance[] |
getInstances()
Returns the processing unit instances associated with this partition.
|
int |
getPartitionId()
Returns the partition id (starting from 0).
|
ProcessingUnitInstance |
getPrimary()
If the processing unit has an embedded space, will return the processing unit instance that
holds a the primary space instance.
|
ProcessingUnit |
getProcessingUnit()
Returns the processing unit this partition is part of.
|
Iterator<ProcessingUnitInstance> |
iterator() |
void |
removeProcessingUnitInstance(String uid) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public DefaultProcessingUnitPartition(ProcessingUnit processingUnit, int patitionId)
public int getPartitionId()
ProcessingUnitPartition
ProcessingUnitInstance.getInstanceId()
starts from 1.getPartitionId
in interface ProcessingUnitPartition
public ProcessingUnitInstance[] getInstances()
ProcessingUnitPartition
getInstances
in interface ProcessingUnitPartition
public ProcessingUnit getProcessingUnit()
ProcessingUnitPartition
getProcessingUnit
in interface ProcessingUnitPartition
public ProcessingUnitInstance getPrimary()
ProcessingUnitPartition
getPrimary
in interface ProcessingUnitPartition
public ProcessingUnitInstance getBackup()
ProcessingUnitPartition
getBackup
in interface ProcessingUnitPartition
public Iterator<ProcessingUnitInstance> iterator()
iterator
in interface Iterable<ProcessingUnitInstance>
public void addProcessingUnitInstance(ProcessingUnitInstance processingUnitInstance)
addProcessingUnitInstance
in interface InternalProcessingUnitPartition
public void removeProcessingUnitInstance(String uid)
removeProcessingUnitInstance
in interface InternalProcessingUnitPartition
Copyright © GigaSpaces.