DatabaseImpl dbImpl = DbInternal.dbGetDatabaseImpl(db);
/* Get all the lsns in the database. */
GatherLSNs gatherLsns = new GatherLSNs();
long rootLsn = dbImpl.getTree().getRootLsn();
SortedLSNTreeWalker walker =
new SortedLSNTreeWalker(dbImpl,
false, // don't remove from INList
false, // don't set db state
rootLsn,
gatherLsns);
walker.walk();
Set lsnsInTree = gatherLsns.getLsns();
lsnsInTree.add(new Long(rootLsn));
/* Get all the files used by this database. */
Iterator iter = lsnsInTree.iterator();