コード例 #1
0
 private void Read(RaftLog raftLog)
 {
     try
     {
         using (RaftLogCursor cursor = raftLog.GetEntryCursor(0))
         {
             while (cursor.Next())
             {
                 RaftLogEntry     entry   = cursor.get();
                 ReplicatedString content = ( ReplicatedString )entry.Content();
                 assertEquals(StringForIndex(cursor.Index()), content.Value());
             }
         }
     }
     catch (IOException e)
     {
         throw new Exception(e);
     }
 }