예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldGeneratePruneCommandsOnRequest() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldGeneratePruneCommandsOnRequest()
        {
            // given
            InMemoryRaftLog raftLog = new InMemoryRaftLog();
            RaftState       state   = raftState().myself(_myself).entryLog(raftLog).build();

            // when
            Org.Neo4j.causalclustering.core.consensus.RaftMessages_PruneRequest pruneRequest = new Org.Neo4j.causalclustering.core.consensus.RaftMessages_PruneRequest(1000);
            Outcome outcome = Role.handler.handle(pruneRequest, state, Log());

            // then
            assertThat(outcome.LogCommands, hasItem(new PruneLogCommand(1000)));
        }
예제 #2
0
 public override Outcome Handle(Org.Neo4j.causalclustering.core.consensus.RaftMessages_PruneRequest pruneRequest)
 {
     Pruning.HandlePruneRequest(Outcome, pruneRequest);
     return(Outcome);
 }
예제 #3
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_PruneRequest pruneRequest) throws Exception
            public override Void Handle(Org.Neo4j.causalclustering.core.consensus.RaftMessages_PruneRequest pruneRequest)
            {
                return(IllegalOutbound(pruneRequest));
            }
예제 #4
0
 public override Void Handle(Org.Neo4j.causalclustering.core.consensus.RaftMessages_PruneRequest pruneRequest)
 {
     return(null);                        // Not network
 }
예제 #5
0
 internal static void HandlePruneRequest(Outcome outcome, Org.Neo4j.causalclustering.core.consensus.RaftMessages_PruneRequest pruneRequest)
 {
     outcome.AddLogCommand(new PruneLogCommand(pruneRequest.PruneIndex()));
 }