Esempio n. 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public org.neo4j.causalclustering.core.consensus.outcome.Outcome handle(org.neo4j.causalclustering.core.consensus.RaftMessages_Heartbeat heartbeat) throws java.io.IOException
            public override Outcome Handle(RaftMessages_Heartbeat heartbeat)
            {
                if (heartbeat.LeaderTerm() < Ctx.term())
                {
                    return(Outcome);
                }

                StepDownToFollower(Outcome, Ctx);
                Log.info("Moving to FOLLOWER state after receiving heartbeat at term %d (my term is " + "%d) from %s", heartbeat.LeaderTerm(), Ctx.term(), heartbeat.From());
                Heart.Beat(Ctx, Outcome, heartbeat, Log);
                return(Outcome);
            }