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 PartitionEventgetPartitionId in interface IPartitionLostEventpublic int getLostBackupCount()
IPartition.MAX_BACKUP_COUNT is returned.getLostBackupCount in interface PartitionLostEventpublic int getLostReplicaIndex()
IPartitionLostEventFor instance, 0 means only the owner of the partition is lost, 1 means both the owner and first backup are lost.
getLostReplicaIndex in interface IPartitionLostEventpublic Address getEventSource()
getEventSource in interface PartitionLostEventgetEventSource in interface IPartitionLostEventpublic 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.