com.hazelcast.partition
Class PartitionLostEvent

java.lang.Object
  extended by com.hazelcast.partition.PartitionLostEvent
All Implemented Interfaces:
DataSerializable, PartitionEvent

public class PartitionLostEvent
extends Object
implements DataSerializable, PartitionEvent

The event that is fired when a partition lost its owner and all backups.

See Also:
Partition, PartitionService, PartitionLostListener

Constructor Summary
PartitionLostEvent()
           
PartitionLostEvent(int partitionId, int lostBackupCount, Address eventSource)
           
 
Method Summary
 Address getEventSource()
          Returns the address of the node that dispatches the event
 int getLostBackupCount()
          Returns the number of lost backups 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PartitionLostEvent

public PartitionLostEvent()

PartitionLostEvent

public PartitionLostEvent(int partitionId,
                          int lostBackupCount,
                          Address eventSource)
Method Detail

getPartitionId

public int getPartitionId()
Returns the lost partition id.

Specified by:
getPartitionId in interface PartitionEvent
Returns:
the lost partition id.

getLostBackupCount

public int getLostBackupCount()
Returns the number of lost backups for the partition. O: the owner, 1: first backup, 2: second backup ...

Returns:
the number of lost backups for the partition

getEventSource

public Address getEventSource()
Returns the address of the node that dispatches the event

Returns:
the address of the node that dispatches the event

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.