public interface InternalPartitionService extends IPartitionService
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_REPLICA_SYNC_DELAY
Delay for anti-entropy replica synchronization in milliseconds.
|
static String |
MIGRATION_EVENT_TOPIC
Static constant for dispatching and listening migration events
|
static int |
MIGRATION_RETRY_COUNT
Retry count for migration operations.
|
static long |
MIGRATION_RETRY_PAUSE
Retry pause for migration operations in milliseconds.
|
static String |
PARTITION_LOST_EVENT_TOPIC
Static constant for dispatching and listening internal partition lost events
|
static long |
REPLICA_SYNC_RETRY_DELAY
Retry delay for replica synchronization in milliseconds.
|
SERVICE_NAME
Modifier and Type | Method and Description |
---|---|
PartitionRuntimeState |
createPartitionState() |
PartitionTableView |
createPartitionTableView() |
void |
firstArrangement() |
InternalPartition[] |
getInternalPartitions() |
int |
getMemberGroupsSize() |
List<Integer> |
getMemberPartitionsIfAssigned(Address target)
Returns partition id list assigned to given target if partitions are assigned when method is called.
|
InternalPartition |
getPartition(int partitionId)
Returns the IPartition for a given partitionId.
|
InternalPartition |
getPartition(int partitionId,
boolean triggerOwnerAssignment)
Returns the IPartition for a given partitionId.
|
long[] |
getPartitionReplicaVersions(int partitionId) |
long[] |
incrementPartitionReplicaVersions(int partitionId,
int totalBackupCount) |
boolean |
isMemberAllowedToJoin(Address address) |
boolean |
isPartitionReplicaVersionStale(int partitionId,
long[] versions,
int replicaIndex) |
void |
memberAdded(MemberImpl newMember) |
void |
memberRemoved(MemberImpl deadMember) |
void |
pauseMigration()
Pause all migrations
|
boolean |
prepareToSafeShutdown(long timeout,
TimeUnit seconds) |
void |
resumeMigration()
Resume all migrations
|
void |
updatePartitionReplicaVersions(int partitionId,
long[] replicaVersions,
int replicaIndex)
Updates the partition replica version and triggers replica sync if the replica is dirty (e.g.
|
addLocalPartitionLostListener, addMigrationListener, addPartitionLostListener, getMaxAllowedBackupCount, getMemberPartitions, getMemberPartitionsMap, getMigrationQueueSize, getPartitionCount, getPartitionId, getPartitionId, getPartitionOwner, getPartitionOwnerOrWait, getPartitions, getPartitionStateVersion, hasOnGoingMigration, hasOnGoingMigrationLocal, isMemberStateSafe, isPartitionOwner, removeMigrationListener, removePartitionLostListener
static final int MIGRATION_RETRY_COUNT
Current Invocation mechanism retries first 5 invocations without pausing.
static final long MIGRATION_RETRY_PAUSE
static final long DEFAULT_REPLICA_SYNC_DELAY
static final long REPLICA_SYNC_RETRY_DELAY
static final String MIGRATION_EVENT_TOPIC
static final String PARTITION_LOST_EVENT_TOPIC
InternalPartition getPartition(int partitionId)
IPartitionService
getPartition
in interface IPartitionService
partitionId
- the partitionIdInternalPartition getPartition(int partitionId, boolean triggerOwnerAssignment)
IPartitionService
triggerOwnerAssignment
is true,
it will trigger partition assignment.
The IPartition for a given partitionId will never change, so it can be cached safely.getPartition
in interface IPartitionService
partitionId
- the partitionIdtriggerOwnerAssignment
- flag to trigger partition assignmentint getMemberGroupsSize()
void pauseMigration()
void resumeMigration()
boolean isMemberAllowedToJoin(Address address)
void memberAdded(MemberImpl newMember)
void memberRemoved(MemberImpl deadMember)
boolean prepareToSafeShutdown(long timeout, TimeUnit seconds)
InternalPartition[] getInternalPartitions()
void firstArrangement()
PartitionRuntimeState createPartitionState()
boolean isPartitionReplicaVersionStale(int partitionId, long[] versions, int replicaIndex)
long[] getPartitionReplicaVersions(int partitionId)
void updatePartitionReplicaVersions(int partitionId, long[] replicaVersions, int replicaIndex)
partitionId
- the id of the partition for which we received a new versionreplicaVersions
- the received replica versionsreplicaIndex
- the index of this replicalong[] incrementPartitionReplicaVersions(int partitionId, int totalBackupCount)
PartitionTableView createPartitionTableView()
List<Integer> getMemberPartitionsIfAssigned(Address target)
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.