public class MigrationEvent extends Object implements DataSerializable, PartitionEvent
Partition
,
PartitionService
,
MigrationListener
Modifier and Type | Class and Description |
---|---|
static class |
MigrationEvent.MigrationStatus
Migration status: Started, completed or failed
|
Constructor and Description |
---|
MigrationEvent() |
MigrationEvent(int partitionId,
Member oldOwner,
Member newOwner,
MigrationEvent.MigrationStatus status) |
Modifier and Type | Method and Description |
---|---|
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 is being) migrated
|
MigrationEvent.MigrationStatus |
getStatus()
Returns the status of the migration: started, completed or failed
|
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public MigrationEvent()
public MigrationEvent(int partitionId, Member oldOwner, Member newOwner, MigrationEvent.MigrationStatus status)
public int getPartitionId()
getPartitionId
in interface PartitionEvent
public Member getOldOwner()
public Member getNewOwner()
public MigrationEvent.MigrationStatus getStatus()
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.