static LogFile make(File logReplica) { return make(logReplica.getName(), Collections.singletonList(logReplica)); }
static LogFile make(File logReplica) { return make(logReplica.getName(), Collections.singletonList(logReplica)); }
static LogFile make(File logReplica) { return make(logReplica.getName(), Collections.singletonList(logReplica)); }
static LogFile make(File logReplica) { return make(logReplica.getName(), Collections.singletonList(logReplica)); }
/** * We read txn log files, if we fail we throw only if the user has specified * OnTxnErr.THROW, else we log an error and apply the txn log anyway */ void classifyFiles(File txnFile) { try (LogFile txn = LogFile.make(txnFile)) { readTxnLog(txn); classifyFiles(txn); files.put(txnFile, FileType.TXN_LOG); } }
/** * We read txn log files, if we fail we throw only if the user has specified * OnTxnErr.THROW, else we log an error and apply the txn log anyway */ void classifyFiles(File txnFile) { try (LogFile txn = LogFile.make(txnFile)) { readTxnLog(txn); classifyFiles(txn); files.put(txnFile, FileType.TXN_LOG); } }
/** * We read txn log files, if we fail we throw only if the user has specified * OnTxnErr.THROW, else we log an error and apply the txn log anyway */ void classifyFiles(File txnFile) { try (LogFile txn = LogFile.make(txnFile)) { readTxnLog(txn); classifyFiles(txn); files.put(txnFile, FileType.TXN_LOG); } }
/** * We read txn log files, if we fail we throw only if the user has specified * OnTxnErr.THROW, else we log an error and apply the txn log anyway */ void classifyFiles(File txnFile) { try (LogFile txn = LogFile.make(txnFile)) { readTxnLog(txn); classifyFiles(txn); files.put(txnFile, FileType.TXN_LOG); } }
static boolean removeUnfinishedLeftovers(Map.Entry<String, List<File>> entry) { try(LogFile txn = LogFile.make(entry.getKey(), entry.getValue())) { if (txn.verify()) { Throwable failure = txn.removeUnfinishedLeftovers(null); if (failure != null) { logger.error("Failed to remove unfinished transaction leftovers for transaction log {}", txn.toString(true), failure); return false; } return true; } else { logger.error("Unexpected disk state: failed to read transaction log {}", txn.toString(true)); return false; } } } }
static boolean removeUnfinishedLeftovers(Map.Entry<String, List<File>> entry) { try(LogFile txn = LogFile.make(entry.getKey(), entry.getValue())) { if (txn.verify()) { Throwable failure = txn.removeUnfinishedLeftovers(null); if (failure != null) { logger.error("Failed to remove unfinished transaction leftovers for transaction log {}", txn.toString(true), failure); return false; } return true; } else { logger.error("Unexpected disk state: failed to read transaction log {}", txn.toString(true)); return false; } } } }
static boolean removeUnfinishedLeftovers(Map.Entry<String, List<File>> entry) { try(LogFile txn = LogFile.make(entry.getKey(), entry.getValue())) { if (txn.verify()) { Throwable failure = txn.removeUnfinishedLeftovers(null); if (failure != null) { logger.error("Failed to remove unfinished transaction leftovers for transaction log {}", txn.toString(true), failure); return false; } return true; } else { logger.error("Unexpected disk state: failed to read transaction log {}", txn.toString(true)); return false; } } } }