public void buildRecoveryPlan() throws PersistitIOException, PersistitInterruptedException {
        try {
            //
            // Find the keystone (last) journal file and validate it.
            findAndValidateKeystone();
            if (_keystoneAddress == -1) {
                return;
            }

            //
            // Validate the previous journal files required to complete
            // recovery.
            //
            long fromGeneration = _baseAddress / _blockSize;
            long toGeneration = _keystoneAddress / _blockSize;
            for (long generation = fromGeneration; generation < toGeneration; generation++) {
                validateMemberFile(generation);
            }
            //
            // Count committed and uncommitted transactions.
            //
            for (final Iterator<TransactionMapItem> iterator = _recoveredTransactionMap.values().iterator(); iterator
                    .hasNext();) {
                TransactionMapItem item = iterator.next();
                if (item.isCommitted()) {
                    _committedTransactionCount++;
                } else if (item.getStartTimestamp() < _lastValidCheckpoint.getTimestamp()) {
                    _uncommittedTransactionCount++;
                    try {
                        _persistit.getTransactionIndex().injectAbortedTransaction(item.getStartTimestamp());
                    } catch (InterruptedException ie) {
                        throw new PersistitInterruptedException(ie);
                    }
                } else {
                    /*
                     * An uncommitted transaction that started after the last
                     * valid checkpoint is of no interest.
                     */
                    iterator.remove();
                }
            }
            _persistit.getLogBase().recoveryPlan.log(_pageMap.size(), _committedTransactionCount,
                    _uncommittedTransactionCount);
        } catch (PersistitIOException pe) {
            _persistit.getLogBase().recoveryFailure.log(pe);
            throw pe;
        }

    }