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()
PartitionEvent
getPartitionId
in interface PartitionEvent
public int getReplicaIndex()
ReplicaMigrationEvent
getReplicaIndex
in interface ReplicaMigrationEvent
public Member getSource()
ReplicaMigrationEvent
getSource
in interface ReplicaMigrationEvent
public Member getDestination()
ReplicaMigrationEvent
getDestination
in interface ReplicaMigrationEvent
public MigrationState getMigrationState()
ReplicaMigrationEvent
getMigrationState
in interface ReplicaMigrationEvent
public boolean isSuccess()
ReplicaMigrationEvent
isSuccess
in interface ReplicaMigrationEvent
public long getElapsedTime()
ReplicaMigrationEvent
getElapsedTime
in interface ReplicaMigrationEvent
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.public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getClassId()
IdentifiedDataSerializable
getClassId
in interface IdentifiedDataSerializable
Copyright © 2019 Hazelcast, Inc.. All rights reserved.