// changed to public public boolean isTargetEntry(byte entryTypeNum, byte entryTypeVersion) throws DatabaseException { lastEntryWasDelete = false; lastEntryWasDupDelete = false; targetLogEntry = null; dbIdTrackingEntry = null; txnIdTrackingEntry = null; nodeTrackingEntry = null; inTrackingEntry = null; fsTrackingEntry = null; isProvisional = LogEntryType.isProvisional(entryTypeVersion); /* Get the log entry type instance we need to read the entry. */ fromLogType = LogEntryType.findType(entryTypeNum, entryTypeVersion); LogEntry possibleTarget = (LogEntry) targetEntryMap.get(fromLogType); /* * If the entry is provisional, we won't be reading it in its entirety; * otherwise, we try to establish targetLogEntry. */ if (!isProvisional) { targetLogEntry = possibleTarget; } /* Was the log entry an IN deletion? */ if (LogEntryType.LOG_IN_DELETE_INFO.equals(fromLogType)) { lastEntryWasDelete = true; } if (LogEntryType.LOG_IN_DUPDELETE_INFO.equals(fromLogType)) { lastEntryWasDupDelete = true; } if (trackIds) { /* * Check if it's a db or txn id tracking entry. Note that these * entries do not overlap with targetLogEntry. */ if (!isProvisional) { dbIdTrackingEntry = (LNLogEntry) dbIdTrackingMap.get(fromLogType); txnIdTrackingEntry = (LNLogEntry) txnIdTrackingMap.get(fromLogType); } /* * Determine nodeTrackingEntry, inTrackingEntry, fsTrackingEntry. * Note that these entries do overlap with targetLogEntry. */ if (fromLogType.isNodeType()) { if (possibleTarget != null) { nodeTrackingEntry = (NodeLogEntry) possibleTarget; } else if (dbIdTrackingEntry != null) { nodeTrackingEntry = dbIdTrackingEntry; } else if (txnIdTrackingEntry != null) { nodeTrackingEntry = txnIdTrackingEntry; } else { nodeTrackingEntry = (NodeLogEntry) otherNodeTrackingMap.get(fromLogType); if (nodeTrackingEntry == null) { nodeTrackingEntry = (NodeLogEntry) fromLogType.getNewLogEntry(); otherNodeTrackingMap.put(fromLogType, nodeTrackingEntry); } } if (nodeTrackingEntry instanceof INLogEntry) { inTrackingEntry = (INLogEntry) nodeTrackingEntry; } if (LogEntryType.LOG_FILESUMMARYLN.equals(fromLogType)) { fsTrackingEntry = (LNLogEntry) nodeTrackingEntry; } } /* Count all entries as new. */ tracker.countNewLogEntry( getLastLsn(), fromLogType, LogManager.HEADER_BYTES + currentEntrySize); /* * Return true if this entry should be passed on to processEntry. If * we're tracking ids, return if this is a targeted entry or if it's * any kind of tracked entry or node. */ return (targetLogEntry != null) || (dbIdTrackingEntry != null) || (txnIdTrackingEntry != null) || (nodeTrackingEntry != null); } else { /* * Return true if this entry should be passed on to processEntry. If * we're not tracking ids, only return true if it's a targeted * entry. */ return (targetLogEntry != null); } }