public interface InternalPartition extends IPartition
Modifier and Type | Field and Description |
---|---|
static int |
MAX_REPLICA_COUNT |
MAX_BACKUP_COUNT
Modifier and Type | Method and Description |
---|---|
PartitionReplica |
getOwnerReplicaOrNull()
Returns the partition replica of the owner of this partition.
|
PartitionReplica |
getReplica(int replicaIndex)
Returns the partition replica assigned to the replica index.
|
int |
getReplicaIndex(PartitionReplica replica)
Return the index of partition replica for this partition.
|
getOwnerOrNull, getPartitionId, getReplicaAddress, isLocal, isMigrating, isOwnerOrBackup
static final int MAX_REPLICA_COUNT
PartitionReplica getOwnerReplicaOrNull()
If no owner has been set yet, null is returned. So be careful with assuming that a non null
value is returned.
The value could be stale when returned.
int getReplicaIndex(PartitionReplica replica)
replica
- partition replicaPartitionReplica getReplica(int replicaIndex)
The owner has replica index 0.
The returned value could be null
if the owner/replica has not yet been set.
The returned value could be stale when it is returned.
replicaIndex
- the index of the replicaArrayIndexOutOfBoundsException
- when replica index is out of boundsCopyright © 2019 Hazelcast, Inc.. All Rights Reserved.