@Managed public abstract class PartitionNotifier extends java.lang.Object
Constructor and Description |
---|
PartitionNotifier() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
stateChange(java.lang.String partitionName,
Partition.State oldState,
Partition.State newState)
Called when a partition state change happens.
|
public PartitionNotifier()
protected abstract void stateChange(java.lang.String partitionName, Partition.State oldState, Partition.State newState)
partitionName
- The name of partition that changed.oldState
- The old partition statenewState
- The new partition state
This operation is called whenever a partition has a change in the
partition State. The notifier is called on all remote nodes where
a notifier instance is defined via Partition.setNotifier(com.kabira.platform.highavailability.PartitionNotifier)
.
Partition state changes are never lost, and called in the order
that the state changes occur. Since accessing a Partition instance via
PartitionManager.getPartition(java.lang.String)
will contain a snapshot of the
partition state, this method passes in the old and new states.