public void completeInterruptedTransaction(int transactionId1, int transactionId2) { if (!File4.exists(lockFileName(_fileName))) { return; } if (!lockFileSignalsInterruptedTransaction()) { return; } ByteArrayBuffer buffer = new ByteArrayBuffer(Const4.INT_LENGTH); openLogFile(); read(_logFile, buffer); int length = buffer.readInt(); if (length > 0) { buffer = new ByteArrayBuffer(length); read(_logFile, buffer); buffer.incrementOffset(Const4.INT_LENGTH); readWriteSlotChanges(buffer); } deleteLockFile(); closeLogFile(); deleteLogFile(); }
private void deleteLogFile() { File4.delete(logFileName(_fileName)); }