@Override public void purgeLogsOlderThan(long minTxIdToKeep) throws IOException {
  Preconditions.checkArgument(minTxIdToKeep > 0,"Invalid transaction id " + minTxIdToKeep);
  checkClosedOrInError("purgeLogSegmentsOlderThan");
  BKLogWriteHandler ledgerHandler=createWriteHandler(true);
  try {
    LOG.info("Purging logs for {} older than {}",ledgerHandler.getFullyQualifiedName(),minTxIdToKeep);
    FutureUtils.result(ledgerHandler.purgeLogSegmentsOlderThanTxnId(minTxIdToKeep));
  }
  finally {
    Utils.closeQuietly(ledgerHandler);
  }
}

@ Override public void purgeLogsOlderThan ( long minTxIdToKeep ) throws IOException { Preconditions . checkArgument ( minTxIdToKeep > 0 , "Invalid transaction id " + minTxIdToKeep ) ; checkClosedOrInError ( "purgeLogSegmentsOlderThan" ) ; BKLogWriteHandler ledgerHandler = createWriteHandler ( true ) ; try { LOG . info ( "Purging logs for {} older than {}" , ledgerHandler . getFullyQualifiedName ( ) , minTxIdToKeep ) ; FutureUtils . result ( ledgerHandler . purgeLogSegmentsOlderThanTxnId ( minTxIdToKeep ) ) ; } finally { Utils . closeQuietly ( ledgerHandler ) ; } }
the distributedlogmanager may archive / purge any logs for transactionid less than or equal to minimagetxid . this is to be used only when the client explicitly manages deletion . if the cleanup policy is based on sliding time window , then this method need not be called .
