com.cloudtran.replicator.isolator
Interface ReplicatorElecter

All Known Implementing Classes:
DefaultReplicatorElecter

public interface ReplicatorElecter


Method Summary
 Member elect(Member thisMember, Member currentReplicator, Member[] availableIsolators)
          This method only gets called on an isolator, after it has been elected the primary isolator.
 

Method Detail

elect

Member elect(Member thisMember,
             Member currentReplicator,
             Member[] availableIsolators)
This method only gets called on an isolator, after it has been elected the primary isolator. Once we know that, we can elect the new replicator.

Parameters:
thisMember - The current member. This will be the newly elected Isolator
currentReplicator - the current replicator Member. If there is no active replicator, currentReplicator will be null. currentReplicator may be non-null but may represent a Member that has left the cluster.
availableIsolators - The available Isolators. This will include thisMember. It may also be of length 1, in which case you should return thisMember.
Returns:
Return the newly elected Isolator Member, chosen from availableIsolators. If you have a choice, avoid this member, to improve performance on the primary Isolator.

If there is a backup storage available on some Isolators but not all, you should take this into account in selecting the new replicator.

If the current replicator is still alive, the current implementation does not allow you to change it.