Search in sources :

Example 1 with LeaderChangeContext

use of io.dingodb.raft.entity.LeaderChangeContext in project dingo by dingodb.

the class FSMCallerImpl method onStopFollowing.

@Override
public boolean onStopFollowing(final LeaderChangeContext ctx) {
    return enqueueTask((task, sequence) -> {
        task.type = TaskType.STOP_FOLLOWING;
        task.leaderChangeCtx = new LeaderChangeContext(ctx.getLeaderId(), ctx.getTerm(), ctx.getStatus());
    });
}
Also used : LeaderChangeContext(io.dingodb.raft.entity.LeaderChangeContext)

Example 2 with LeaderChangeContext

use of io.dingodb.raft.entity.LeaderChangeContext in project dingo by dingodb.

the class FSMCallerImpl method onStartFollowing.

@Override
public boolean onStartFollowing(final LeaderChangeContext ctx) {
    return enqueueTask((task, sequence) -> {
        task.type = TaskType.START_FOLLOWING;
        task.leaderChangeCtx = new LeaderChangeContext(ctx.getLeaderId(), ctx.getTerm(), ctx.getStatus());
    });
}
Also used : LeaderChangeContext(io.dingodb.raft.entity.LeaderChangeContext)

Aggregations

LeaderChangeContext (io.dingodb.raft.entity.LeaderChangeContext)2