com.hazelcast.core
Class MigrationEvent

java.lang.Object
  extended by com.hazelcast.core.MigrationEvent
All Implemented Interfaces:
DataSerializable

public class MigrationEvent
extends Object
implements DataSerializable

An event fired when a partition migration starts, completes or fails.

See Also:
Partition, PartitionService, MigrationListener

Nested Class Summary
static class MigrationEvent.MigrationStatus
          Migration status: Started, completed or failed
 
Constructor Summary
MigrationEvent()
           
MigrationEvent(int partitionId, Member oldOwner, Member newOwner, MigrationEvent.MigrationStatus status)
           
 
Method Summary
 Member getNewOwner()
          Returns the new owner of the migrating partition
 Member getOldOwner()
          Returns the old owner of the migrating partition
 int getPartitionId()
          Returns the id of the partition which is (or being) migrated
 MigrationEvent.MigrationStatus getStatus()
          Returns the status of the migration: Started, completed or failed
 void readData(com.hazelcast.nio.ObjectDataInput in)
           
 String toString()
           
 void writeData(com.hazelcast.nio.ObjectDataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MigrationEvent

public MigrationEvent()

MigrationEvent

public MigrationEvent(int partitionId,
                      Member oldOwner,
                      Member newOwner,
                      MigrationEvent.MigrationStatus status)
Method Detail

getPartitionId

public int getPartitionId()
Returns the id of the partition which is (or being) migrated

Returns:
partition id

getOldOwner

public Member getOldOwner()
Returns the old owner of the migrating partition

Returns:
old owner of partition

getNewOwner

public Member getNewOwner()
Returns the new owner of the migrating partition

Returns:
new owner of partition

getStatus

public MigrationEvent.MigrationStatus getStatus()
Returns the status of the migration: Started, completed or failed

Returns:
migration status

writeData

public void writeData(com.hazelcast.nio.ObjectDataOutput out)
               throws IOException
Specified by:
writeData in interface DataSerializable
Throws:
IOException

readData

public void readData(com.hazelcast.nio.ObjectDataInput in)
              throws IOException
Specified by:
readData in interface DataSerializable
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.