コード例 #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_PreVote_Request req) throws java.io.IOException
            public override Outcome Handle(Org.Neo4j.causalclustering.core.consensus.RaftMessages_PreVote_Request req)
            {
                if (Ctx.supportPreVoting())
                {
                    if (req.Term() > Ctx.term())
                    {
                        StepDownToFollower(Outcome, Ctx);
                        Log.info("Moving to FOLLOWER state after receiving pre vote request from %s at term %d (I am at %d)", req.From(), req.Term(), Ctx.term());
                    }
                    Voting.DeclinePreVoteRequest(Ctx, Outcome, req);
                }
                return(Outcome);
            }
コード例 #2
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_PreVote_Request request, org.neo4j.causalclustering.core.consensus.outcome.Outcome outcome, org.neo4j.causalclustering.core.consensus.state.ReadableRaftState ctx, org.neo4j.logging.Log log) throws java.io.IOException
            public override Outcome Handle(Org.Neo4j.causalclustering.core.consensus.RaftMessages_PreVote_Request request, Outcome outcome, ReadableRaftState ctx, Log log)
            {
                Voting.DeclinePreVoteRequest(ctx, outcome, request);
                return(outcome);
            }