class SyncSenderLogAnalyzer implements ISyncSenderLogAnalyzer {

  @Override
  public void recover() throws IOException {
    if (currentLocalFile.exists() && !lastLocalFile.exists()) {
      FileUtils.moveFile(currentLocalFile, lastLocalFile);
    } else {
      Set<String> lastLocalFiles = new HashSet<>();
      Set<String> deletedFiles = new HashSet<>();
      Set<String> newFiles = new HashSet<>();
      loadLastLocalFiles(lastLocalFiles);
      loadLogger(deletedFiles, newFiles);
      lastLocalFiles.removeAll(deletedFiles);
      lastLocalFiles.addAll(newFiles);
      updateLastLocalFile(lastLocalFiles);
    }
    FileUtils.deleteDirectory(new File(senderPath, SyncConstant.DATA_SNAPSHOT_NAME));
    syncLogFile.delete();
  }

  public  SyncSenderLogAnalyzer(String senderPath);

}