public static void verifyBackupStrategy(BackupStrategy2 backupStrategy) {
    int maxBackupIndex = backupStrategy.getMaxBackupIndex();
    if (maxBackupIndex < 0) {
      throw new IllegalArgumentException("Max backup index should not be less than 0");
    } else if (maxBackupIndex == Integer.MAX_VALUE) {
      throw new IllegalArgumentException("Max backup index too big: " + maxBackupIndex);
    }
  }
Check if a {@link BackupStrategy2} is valid, will throw a exception if invalid.

@param backupStrategy the backup strategy to be verify
xlog/src/main/java/com/elvishew/xlog/internal/printer/file/backup/BackupUtil.java