code: @Override
      public void prepareToWriteJournalEntry() throws JournalException {
          synchronized (JournalWriter.SYNCHRONIZER) {
              if (state == SHUTDOWN) {
                  return;
              }
  
              logger.debug("Preparing to write journal entry.");
  
              if (state == FILE_OPEN) {
                  closeFileIfAppropriate();
              }
  
              if (state == FILE_CLOSED) {
                  openNewFile();
              }
          }
      }
docs: <p>
  Get ready to write a journal entry, insuring that we have an open file.
  </p>
  <p>
  If we are shutdown, ignore this request. Otherwise, check if we need to
  shut a file down based on size limit. Then check to see whether we need
  to open another file. If so, we'll need a repository hash and a filename.
  </p>
  
  @see org.fcrepo.server.journal.JournalWriter#prepareToWriteJournalEntry()