com.hazelcast.spi
Class PartitionReplicationEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.hazelcast.spi.PartitionReplicationEvent
All Implemented Interfaces:
Serializable

public class PartitionReplicationEvent
extends EventObject

An event send to MigrationAwareService when partitions changes happen.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
PartitionReplicationEvent(int partitionId, int replicaIndex)
          Creates a PartitionReplicationEvent
 
Method Summary
 int getPartitionId()
          The id of the partition.
 int getReplicaIndex()
          The replica index.
 String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PartitionReplicationEvent

public PartitionReplicationEvent(int partitionId,
                                 int replicaIndex)
Creates a PartitionReplicationEvent

Parameters:
partitionId - the partition id.
replicaIndex - the replica index.
Method Detail

getPartitionId

public int getPartitionId()
The id of the partition.

Returns:
the id of the partition

getReplicaIndex

public int getReplicaIndex()
The replica index. 0 is priimary, the rest is backup.

Returns:
the replica index

toString

public String toString()
Overrides:
toString in class EventObject


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