//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public ComparableRaftLog(org.neo4j.causalclustering.core.consensus.log.ReadableRaftLog raftLog) throws java.io.IOException public ComparableRaftLog(ReadableRaftLog raftLog) { using (RaftLogCursor cursor = raftLog.GetEntryCursor(0)) { while (cursor.Next()) { Append(cursor.get()); } } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public org.neo4j.causalclustering.core.consensus.log.RaftLogCursor getEntryCursor(long fromIndex) throws java.io.IOException public override RaftLogCursor GetEntryCursor(long fromIndex) { if (StartExplodingConflict) { throw new IOException("Boom! entry cursor"); } else { return(RaftLogCursor.empty()); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private org.neo4j.causalclustering.core.consensus.log.RaftLogEntry getUsingCursor(long logIndex) throws java.io.IOException private RaftLogEntry GetUsingCursor(long logIndex) { if (_cursor == null) { _cursor = _raftLog.getEntryCursor(logIndex); } if (_cursor.next()) { if (_cursor.index() != logIndex) { throw new System.InvalidOperationException(format("expected index %d but was %s", logIndex, _cursor.index())); } return(_cursor.get()); } else { return(null); } }
public override RaftLogCursor GetEntryCursor(long fromIndex) { return(RaftLogCursor.empty()); }