StateType stateType = ctx.type();
Preconditions.checkNotNull(stateType);
if (stateType.equals(FOLLOWER)) {
throw new NotLeaderException(leader.get());
} else if (stateType.equals(CANDIDATE)) {
throw new NoLeaderException();
}
return Futures.immediateCancelledFuture();
}