Package com.hazelcast.partition
Interface MigrationListener
-
- All Superinterfaces:
java.util.EventListener
public interface MigrationListener extends java.util.EventListener
MigrationListener provides the ability to listen to partition migration process and events.- See Also:
Partition
,PartitionService
,MigrationState
,ReplicaMigrationEvent
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
migrationFinished(MigrationState state)
Called when the migration process finishes.void
migrationStarted(MigrationState state)
Called when the migration process starts.void
replicaMigrationCompleted(ReplicaMigrationEvent event)
Called when a partition replica migration is completed successfully.void
replicaMigrationFailed(ReplicaMigrationEvent event)
Called when a partition replica migration is failed.
-
-
-
Method Detail
-
migrationStarted
void migrationStarted(MigrationState state)
Called when the migration process starts. A migration process consists of a group of partition replica migrations which are planned together.When migration process is completed,
migrationFinished(MigrationState)
is called.- Parameters:
state
- Plan of the migration process
-
migrationFinished
void migrationFinished(MigrationState state)
Called when the migration process finishes. This event denotes ending of migration process which is started bymigrationStarted(MigrationState)
.Not all of the planned migrations have to be completed. Some of them can be skipped because of a newly created migration plan.
If migration process coordinator member (generally the oldest member in cluster) crashes before migration process ends, then this method may not be called at all.
- Parameters:
state
- Result of the migration process
-
replicaMigrationCompleted
void replicaMigrationCompleted(ReplicaMigrationEvent event)
Called when a partition replica migration is completed successfully.- Parameters:
event
- the event for the partition replica migration
-
replicaMigrationFailed
void replicaMigrationFailed(ReplicaMigrationEvent event)
Called when a partition replica migration is failed.- Parameters:
event
- the event for the partition replica migration
-
-