private void closeFile() throws JournalException {
synchronized (JournalWriter.SYNCHRONIZER) {
// check to be sure that another thread didn't close the file while
// we were waiting for the lock.
if (state == FILE_OPEN) {
sendRequestToAllTransports(new CloseFileRequest());
currentSize = 0;
state = FILE_CLOSED;
}
// turn off the timer that is checking the age of this file.