code: public boolean truncateInvalidTxBefore(long time) throws InvalidTruncateTimeException {
      // guard against changes to the transaction log while processing
      txMetricsCollector.rate("truncateInvalidTxBefore");
      Stopwatch timer = new Stopwatch().start();
      this.logReadLock.lock();
      try {
        boolean success;
        synchronized (this) {
          ensureAvailable();
          success = doTruncateInvalidTxBefore(time);
        }
        appendToLog(TransactionEdit.createTruncateInvalidTxBefore(time));
        txMetricsCollector.histogram("truncateInvalidTxBefore.latency", (int) timer.elapsedMillis());
        return success;
      } finally {
        this.logReadLock.unlock();
      }
    }
docs: Removes all transaction ids started before the given time from invalid list.
  @param time time in milliseconds
  @return true if invalid list got changed, false otherwise
  @throws InvalidTruncateTimeException if there are any in-progress transactions started before given time