Package org.openspaces.admin.internal.pu
Class DefaultProcessingUnitPartition
java.lang.Object
org.openspaces.admin.internal.pu.DefaultProcessingUnitPartition
- All Implemented Interfaces:
Iterable<ProcessingUnitInstance>,InternalProcessingUnitPartition,ProcessingUnitPartition
public class DefaultProcessingUnitPartition
extends Object
implements InternalProcessingUnitPartition
- Author:
- kimchy
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultProcessingUnitPartition(ProcessingUnit processingUnit, int patitionId) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProcessingUnitInstance(ProcessingUnitInstance processingUnitInstance) If the processing unit has an embedded space, will return the processing unit instance that holds a the backup space instance.Returns the processing unit instances associated with this partition.intReturns the partition id (starting from 0).If the processing unit has an embedded space, will return the processing unit instance that holds a the primary space instance.Returns the processing unit this partition is part of.iterator()voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DefaultProcessingUnitPartition
-
-
Method Details
-
getPartitionId
public int getPartitionId()Description copied from interface:ProcessingUnitPartitionReturns the partition id (starting from 0). Note,ProcessingUnitInstance.getInstanceId()starts from 1.- Specified by:
getPartitionIdin interfaceProcessingUnitPartition
-
getInstances
Description copied from interface:ProcessingUnitPartitionReturns the processing unit instances associated with this partition.- Specified by:
getInstancesin interfaceProcessingUnitPartition
-
getProcessingUnit
Description copied from interface:ProcessingUnitPartitionReturns the processing unit this partition is part of.- Specified by:
getProcessingUnitin interfaceProcessingUnitPartition
-
getPrimary
Description copied from interface:ProcessingUnitPartitionIf the processing unit has an embedded space, will return the processing unit instance that holds a the primary space instance.- Specified by:
getPrimaryin interfaceProcessingUnitPartition
-
getBackup
Description copied from interface:ProcessingUnitPartitionIf the processing unit has an embedded space, will return the processing unit instance that holds a the backup space instance.- Specified by:
getBackupin interfaceProcessingUnitPartition
-
iterator
- Specified by:
iteratorin interfaceIterable<ProcessingUnitInstance>
-
addProcessingUnitInstance
- Specified by:
addProcessingUnitInstancein interfaceInternalProcessingUnitPartition
-
removeProcessingUnitInstance
- Specified by:
removeProcessingUnitInstancein interfaceInternalProcessingUnitPartition
-