* For a BINDeltaLogEntry, queue fetching of the full BIN and
* combine the full BIN with the delta when it is processed later.
* See call to reconstituteBIN below.
*/
if (entry instanceof BINDeltaLogEntry) {
BINDelta delta = (BINDelta) entry.getMainItem();
long fullLsn = delta.getLastFullLsn();
pendingLSNs.add(fullLsn);
addToLsnINMap(fullLsn, in, index, delta, lsn);
return null;
}
/* For an LNLogEntry, call postFetchInit and get the lnKey. */
DatabaseImpl dbImpl = in.getDatabase();
byte[] lnKey = null;
if (entry instanceof LNLogEntry) {
LNLogEntry lnEntry = (LNLogEntry) entry;
lnEntry.postFetchInit(dbImpl);
lnKey = lnEntry.getKey();
lnKeyEntry.setData(lnKey);
}
/* Get the Node from the LogEntry. */
Node ret = (Node) entry.getResolvedItem(dbImpl);
/*
* For an IN Node, set the database so it will be passed down to
* nested fetches.
*/
long lastLoggedLsn = lsn;
if (ret instanceof IN) {
IN retIn = (IN) ret;
retIn.setDatabase(dbImpl);
}
/*
* If there is a delta, then this is a BIN to which the delta must
* be applied. The delta LSN is the last logged LSN.
*/
BINDelta delta = inEntry.getDelta();
if (delta != null) {
assert lsn == delta.getLastFullLsn();
assert ret instanceof BIN;
delta.reconstituteBIN(dbImpl, (BIN) ret);
lastLoggedLsn = inEntry.getDeltaLsn();
}
/* During a preload, finally place the Node into the Tree. */
if (fetchAndInsertIntoTree()) {