public interface InternalPartitionService extends IPartitionService, GracefulShutdownAwareService
Modifier and Type | Field and Description |
---|---|
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
|
SERVICE_NAME
Modifier and Type | Method and Description |
---|---|
PartitionRuntimeState |
createPartitionState()
Creates the current partition runtime state.
|
PartitionTableView |
createPartitionTableView() |
PartitionRuntimeState |
firstArrangement()
Causes the partition table to be arranged and published to members if :
this instance has started
this instance is the master
the cluster is
ClusterState.ACTIVE
if the partition table has not already been arranged
if there is no cluster membership change
If this instance is not the master, it will trigger the master to assign the partitions. |
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 partition ID. |
InternalPartition |
getPartition(int partitionId,
boolean triggerOwnerAssignment)
Returns the
IPartition for a given partition ID. |
PartitionReplicaStateChecker |
getPartitionReplicaStateChecker() |
PartitionReplicaVersionManager |
getPartitionReplicaVersionManager() |
PartitionServiceProxy |
getPartitionServiceProxy()
Returns the
PartitionServiceProxy of the partition service.. |
boolean |
isMemberAllowedToJoin(Address address) |
void |
memberAdded(MemberImpl newMember) |
void |
memberRemoved(MemberImpl deadMember) |
void |
pauseMigration()
Pause all migrations
|
void |
resumeMigration()
Resume all migrations
|
addLocalPartitionLostListener, addMigrationListener, addPartitionLostListener, getMaxAllowedBackupCount, getMemberPartitions, getMemberPartitionsMap, getMigrationQueueSize, getPartitionCount, getPartitionId, getPartitionId, getPartitionOwner, getPartitionOwnerOrWait, getPartitions, getPartitionStateVersion, hasOnGoingMigration, hasOnGoingMigrationLocal, isMemberStateSafe, isPartitionOwner, removeMigrationListener, removePartitionLostListener
onShutdown
static final int MIGRATION_RETRY_COUNT
Current Invocation mechanism retries first 5 invocations without pausing.
static final long MIGRATION_RETRY_PAUSE
static final String MIGRATION_EVENT_TOPIC
static final String PARTITION_LOST_EVENT_TOPIC
InternalPartition getPartition(int partitionId)
IPartitionService
IPartition
for a given partition ID.
If the owner of the partition is not set yet, it will trigger partition assignment.
The IPartition
for a given partition ID will never change, so the result can be cached safely.
getPartition
in interface IPartitionService
partitionId
- the partition IDInternalPartition getPartition(int partitionId, boolean triggerOwnerAssignment)
IPartitionService
IPartition
for a given partition ID.
If the owner of the partition is not set yet and triggerOwnerAssignment
is true
,
it will trigger partition assignment.
The IPartition
for a given partition ID will never change, so the result can be cached safely.
getPartition
in interface IPartitionService
partitionId
- the partition IDtriggerOwnerAssignment
- flag to trigger the partition assignmentint getMemberGroupsSize()
void pauseMigration()
void resumeMigration()
boolean isMemberAllowedToJoin(Address address)
void memberAdded(MemberImpl newMember)
void memberRemoved(MemberImpl deadMember)
InternalPartition[] getInternalPartitions()
PartitionRuntimeState firstArrangement()
ClusterState.ACTIVE
PartitionRuntimeState
if this node is the master and the partition table is initializedHazelcastException
- if the partition state generator failed to arrange the partitionsPartitionStateManager.initializePartitionAssignments(java.util.Set)
PartitionRuntimeState createPartitionState()
null
if the node should fetch the most recent partition
table (e.g. this node is a newly appointed master) or if the partition state manager is not initialized.InternalPartitionServiceImpl.isFetchMostRecentPartitionTableTaskRequired()
,
FetchPartitionStateOperation
,
PartitionStateManager.isInitialized()
PartitionReplicaVersionManager getPartitionReplicaVersionManager()
PartitionTableView createPartitionTableView()
List<Integer> getMemberPartitionsIfAssigned(Address target)
PartitionServiceProxy getPartitionServiceProxy()
PartitionServiceProxy
of the partition service..PartitionServiceProxy
PartitionReplicaStateChecker getPartitionReplicaStateChecker()
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.