return foundReferenceLink;
}
public void appendNewReferenceLink(final ReferenceLink referenceLink)
throws GarbageException, ReferenceLinkGarbageException {
GarbageReferenceLinkRBTNode node = referenceLink.getNode();
if (node != null) {
throw new GarbageException("already in file");
}
node = new GarbageReferenceLinkRBTNode(heapRecordableManager,
helperBinaryConversion);
try {
referenceLink.setNode(node);
node.setElement(referenceLink);
heapRecordableManager.attach(node);
garbageReferenceLinkTree.append(node);
node.setStateHaveChanged();
} catch (RBTException exception) {
rbtExceptionCause(exception);
throw new InternalError();// NOPMD unreachable code,
// rbtExceptionCause always throw
// exception
} catch (HeapRecordableException exception) {
throw new GarbageException(exception);
}
if (LOGGER.debugEnabled) {
LOGGER.debug("add reference link record #"
+ node.getDataRecordIdentifier() + ", reference link "
+ referenceLink);
}
}