code: 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.
              if (timer != null) {
                  timer.cancel();
              }
          }
      }
docs: Close the file unconditionally. Called if
  <ul>
  <li>the file passes the size limit,</li>
  <li>the timer expires,</li>
  <li>the server commands a shutdown</li>
  </ul>
  Synchronized so a close request from the timer doesn't conflict with
  other processing.