public class ReplicaMigrationEventImpl extends Object implements ReplicaMigrationEvent, IdentifiedDataSerializable
Partition,
PartitionService,
MigrationListener| Constructor and Description |
|---|
ReplicaMigrationEventImpl() |
ReplicaMigrationEventImpl(MigrationState state,
int partitionId,
int replicaIndex,
Member source,
Member destination,
boolean success,
long elapsedTime) |
| Modifier and Type | Method and Description |
|---|---|
int |
getClassId()
Returns type identifier for this class.
|
Member |
getDestination()
Returns the new owner of the migrating partition replica.
|
long |
getElapsedTime()
Returns the elapsed the time of this migration in milliseconds.
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
MigrationState |
getMigrationState()
Returns the progress information of the overall migration.
|
int |
getPartitionId()
Returns the partition ID that the event is dispatched for.
|
int |
getReplicaIndex()
Returns the index of the partition replica.
|
Member |
getSource()
Returns the old owner of the migrating partition replica.
|
boolean |
isSuccess()
Returns the result of the migration: 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 ReplicaMigrationEventImpl()
public ReplicaMigrationEventImpl(MigrationState state, int partitionId, int replicaIndex, Member source, Member destination, boolean success, long elapsedTime)
public int getPartitionId()
PartitionEventgetPartitionId in interface PartitionEventpublic int getReplicaIndex()
ReplicaMigrationEventgetReplicaIndex in interface ReplicaMigrationEventpublic Member getSource()
ReplicaMigrationEventgetSource in interface ReplicaMigrationEventpublic Member getDestination()
ReplicaMigrationEventgetDestination in interface ReplicaMigrationEventpublic MigrationState getMigrationState()
ReplicaMigrationEventgetMigrationState in interface ReplicaMigrationEventpublic boolean isSuccess()
ReplicaMigrationEventisSuccess in interface ReplicaMigrationEventpublic long getElapsedTime()
ReplicaMigrationEventgetElapsedTime in interface ReplicaMigrationEventpublic void writeData(ObjectDataOutput out) throws IOException
DataSerializablewriteData in interface DataSerializableout - 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
DataSerializablereadData in interface DataSerializablein - inputIOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
input stream has been closed.public int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializablepublic int getClassId()
IdentifiedDataSerializablegetClassId in interface IdentifiedDataSerializableCopyright © 2019 Hazelcast, Inc.. All rights reserved.