com.hazelcast.partition
Class InternalPartitionLostEvent

java.lang.Object
  extended by com.hazelcast.partition.InternalPartitionLostEvent
All Implemented Interfaces:
DataSerializable

@PrivateApi
public class InternalPartitionLostEvent
extends Object
implements DataSerializable

Internal event that is dispatched to @see com.hazelcast.spi.PartitionAwareService#onPartitionLost()

It contains the partition id, number of replicas that is lost and the address of node that detects the partition lost


Constructor Summary
InternalPartitionLostEvent()
           
InternalPartitionLostEvent(int partitionId, int lostReplicaIndex, Address eventSource)
           
 
Method Summary
 Address getEventSource()
          The address of the node that detects the partition lost
 int getLostReplicaIndex()
          0-based replica index that is lost for the partition For instance, 0 means only the owner of the partition is lost, 1 means both the owner and first backup are lost
 int getPartitionId()
          The partition id that is lost
 void readData(ObjectDataInput in)
          Reads fields from the input stream
 String toString()
           
 void writeData(ObjectDataOutput out)
          Writes object fields to output stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InternalPartitionLostEvent

public InternalPartitionLostEvent()

InternalPartitionLostEvent

public InternalPartitionLostEvent(int partitionId,
                                  int lostReplicaIndex,
                                  Address eventSource)
Method Detail

getPartitionId

public int getPartitionId()
The partition id that is lost

Returns:
the partition id that is lost

getLostReplicaIndex

public int getLostReplicaIndex()
0-based replica index that is lost for the partition For instance, 0 means only the owner of the partition is lost, 1 means both the owner and first backup are lost

Returns:
0-based replica index that is lost for the partition

getEventSource

public Address getEventSource()
The address of the node that detects the partition lost

Returns:
the address of the node that detects the partition lost

writeData

public void writeData(ObjectDataOutput out)
               throws IOException
Description copied from interface: DataSerializable
Writes object fields to output stream

Specified by:
writeData in interface DataSerializable
Parameters:
out - output
Throws:
IOException

readData

public void readData(ObjectDataInput in)
              throws IOException
Description copied from interface: DataSerializable
Reads fields from the input stream

Specified by:
readData in interface DataSerializable
Parameters:
in - input
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.