Package com.github.ambry.clustermap
Class DefaultLeaderStandbyStateModel
- java.lang.Object
-
- org.apache.helix.participant.statemachine.StateModel
-
- com.github.ambry.clustermap.DefaultLeaderStandbyStateModel
-
public class DefaultLeaderStandbyStateModel extends org.apache.helix.participant.statemachine.StateModel
A default LeaderStandbyStateModel
to use when the Ambry participants (datanodes) register to Helix. The methods are callbacks that get called within a participant whenever partition's state changes in Helix. For now these are no-ops. In the critical path of puts and gets, there are no leader replicas in Ambry. Every replica can serve reads and writes. However, going forward, it is useful to have one of the replicas chosen as a LEADER for purposes such as replication.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onBecomeLeaderFromStandby(org.apache.helix.model.Message message, org.apache.helix.NotificationContext context)
void
onBecomeOfflineFromLeader(org.apache.helix.model.Message message, org.apache.helix.NotificationContext context)
void
onBecomeOfflineFromStandby(org.apache.helix.model.Message message, org.apache.helix.NotificationContext context)
void
onBecomeStandbyFromLeader(org.apache.helix.model.Message message, org.apache.helix.NotificationContext context)
void
onBecomeStandbyFromOffline(org.apache.helix.model.Message message, org.apache.helix.NotificationContext context)
void
reset()
-
-
-
Method Detail
-
onBecomeStandbyFromOffline
public void onBecomeStandbyFromOffline(org.apache.helix.model.Message message, org.apache.helix.NotificationContext context)
-
onBecomeLeaderFromStandby
public void onBecomeLeaderFromStandby(org.apache.helix.model.Message message, org.apache.helix.NotificationContext context)
-
onBecomeStandbyFromLeader
public void onBecomeStandbyFromLeader(org.apache.helix.model.Message message, org.apache.helix.NotificationContext context)
-
onBecomeOfflineFromStandby
public void onBecomeOfflineFromStandby(org.apache.helix.model.Message message, org.apache.helix.NotificationContext context)
-
onBecomeOfflineFromLeader
public void onBecomeOfflineFromLeader(org.apache.helix.model.Message message, org.apache.helix.NotificationContext context)
-
reset
public void reset()
- Overrides:
reset
in classorg.apache.helix.participant.statemachine.StateModel
-
-