コード例 #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_Timeout_Election election, 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_Timeout_Election election, Outcome outcome, ReadableRaftState ctx, Log log)
            {
                log.Info("Election timeout triggered");
                if (Election.StartPreElection(ctx, outcome, log))
                {
                    outcome.PreElection = true;
                }
                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_Timeout_Election election) throws java.io.IOException
            public override Outcome Handle(Org.Neo4j.causalclustering.core.consensus.RaftMessages_Timeout_Election election)
            {
                Log.info("Failed to get elected. Got votes from: %s", Ctx.votesForMe());
                if (!Election.StartRealElection(Ctx, Outcome, Log))
                {
                    Log.info("Moving to FOLLOWER state after failing to start election");
                    Outcome.NextRole = FOLLOWER;
                }
                return(Outcome);
            }
コード例 #3
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_Timeout_Election election, 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_Timeout_Election election, Outcome outcome, ReadableRaftState ctx, Log log)
            {
                log.Info("Election timeout triggered");
                if (Election.StartRealElection(ctx, outcome, log))
                {
                    outcome.NextRole = CANDIDATE;
                    log.Info("Moving to CANDIDATE state after successfully starting election");
                }
                return(outcome);
            }
コード例 #4
0
            public override Outcome Handle(Org.Neo4j.causalclustering.core.consensus.RaftMessages_Timeout_Election election)
            {
                if (!isQuorum(Ctx.votingMembers().Count, Ctx.heartbeatResponses().Count))
                {
                    StepDownToFollower(Outcome, Ctx);
                    Log.info("Moving to FOLLOWER state after not receiving heartbeat responses in this election timeout " + "period. Heartbeats received: %s", Ctx.heartbeatResponses());
                }

                Outcome.HeartbeatResponses.Clear();
                return(Outcome);
            }
コード例 #5
0
            public override Outcome Handle(Org.Neo4j.causalclustering.core.consensus.RaftMessages_Timeout_Election election, Outcome outcome, ReadableRaftState ctx, Log log)
            {
                log.Info("Election timeout triggered but refusing to be leader");
                ISet <MemberId> memberIds = ctx.VotingMembers();

                if (memberIds != null && memberIds.Contains(ctx.Myself()))
                {
                    outcome.PreElection = true;
                }
                return(outcome);
            }
コード例 #6
0
 public override Void Handle(Org.Neo4j.causalclustering.core.consensus.RaftMessages_Timeout_Election election)
 {
     return(null);                        // Not network
 }
コード例 #7
0
 public override Outcome Handle(Org.Neo4j.causalclustering.core.consensus.RaftMessages_Timeout_Election election, Outcome outcome, ReadableRaftState ctx, Log log)
 {
     log.Info("Election timeout triggered but refusing to be leader");
     return(outcome);
 }
コード例 #8
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_Timeout_Election election) throws java.io.IOException
            public override Outcome Handle(Org.Neo4j.causalclustering.core.consensus.RaftMessages_Timeout_Election election)
            {
                return(ElectionTimeoutHandler.handle(election, Outcome, Ctx, Log));
            }
コード例 #9
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public Void handle(org.neo4j.causalclustering.core.consensus.RaftMessages_Timeout_Election election) throws Exception
            public override Void Handle(Org.Neo4j.causalclustering.core.consensus.RaftMessages_Timeout_Election election)
            {
                return(IllegalOutbound(election));
            }