public class PartitionLostEventImpl extends Object implements PartitionLostEvent, IPartitionLostEvent, IdentifiedDataSerializable
Partition
,
PartitionService
,
PartitionLostListener
Constructor and Description |
---|
PartitionLostEventImpl() |
PartitionLostEventImpl(int partitionId,
int lostBackupCount,
Address eventSource) |
Modifier and Type | Method and Description |
---|---|
int |
getClassId()
Returns type identifier for this class.
|
Address |
getEventSource()
Returns the address of the node that dispatches the event
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getLostBackupCount()
Returns the number of lost backups for the partition.
|
int |
getLostReplicaIndex()
0-based replica index that is lost for the partition.
|
int |
getPartitionId()
Returns the lost partition ID.
|
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public PartitionLostEventImpl()
public PartitionLostEventImpl(int partitionId, int lostBackupCount, Address eventSource)
public int getPartitionId()
getPartitionId
in interface PartitionEvent
getPartitionId
in interface IPartitionLostEvent
public int getLostBackupCount()
IPartition.MAX_BACKUP_COUNT
is returned.getLostBackupCount
in interface PartitionLostEvent
public int getLostReplicaIndex()
IPartitionLostEvent
For instance, 0 means only the owner of the partition is lost, 1 means both the owner and first backup are lost.
getLostReplicaIndex
in interface IPartitionLostEvent
public Address getEventSource()
getEventSource
in interface PartitionLostEvent
getEventSource
in interface IPartitionLostEvent
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.