heapRecord = heapRecordToWriteMap.get(positionInFile);
if (heapRecord == NULL_FILE_STORABLE) {
final String message = READ_HEAP_FILE_NODE_FAILED
+ "read record at poistion " + positionInFile + " failed";
LOGGER.fatal(message);
throw new HeapException(message);
}
if (heapRecord == null) {
heapRecord = readHeapRecordMap.get(positionInFile);
}
if (heapRecord == null) {
heapRecord = heapRecordFactory.createHeapRecord(this,
positionInFile);
try {
heapRecord.readFromFile();
} catch (HeapException exception) {
final String message = READ_HEAP_FILE_NODE_FAILED
+ "read record at poistion " + positionInFile
+ " failed";
LOGGER.fatal(message, exception);
throw new HeapException(message, exception);
}
readHeapRecordMap.put(positionInFile, heapRecord);
}
return heapRecord;