public interface InternalPartitionService extends IPartitionService
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() |
void |
firstArrangement()
Causes the partition table to be arranged and published to members if :
the instance has started
the cluster is
ClusterState.ACTIVE
if it has not already been arranged
if there is no cluster membership change
If this node 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 partitionId.
|
InternalPartition |
getPartition(int partitionId,
boolean triggerOwnerAssignment)
Returns the IPartition for a given partitionId.
|
PartitionReplicaVersionManager |
getPartitionReplicaVersionManager() |
boolean |
isMemberAllowedToJoin(Address address) |
void |
memberAdded(MemberImpl newMember) |
void |
memberRemoved(MemberImpl deadMember) |
void |
pauseMigration()
Pause all migrations
|
boolean |
prepareToSafeShutdown(long timeout,
TimeUnit seconds) |
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
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
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()
ClusterState.ACTIVE
HazelcastException
- 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)
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.