/**
  * Sends the whole content of the file to be duplicated.
  *
  * @throws HornetQException
  * @throws Exception
  */
 public void syncJournalFile(JournalFile jf, JournalContent content) throws Exception {
   if (!enabled) {
     return;
   }
   SequentialFile file = jf.getFile().cloneFile();
   try {
     HornetQServerLogger.LOGGER.journalSynch(jf, file.size(), file);
     sendLargeFile(content, null, jf.getFileID(), file, Long.MAX_VALUE);
   } finally {
     if (file.isOpen()) file.close();
   }
 }
 public void syncPages(SequentialFile file, long id, SimpleString queueName) throws Exception {
   if (enabled) sendLargeFile(null, queueName, id, file, Long.MAX_VALUE);
 }
 public void syncLargeMessageFile(SequentialFile file, long size, long id) throws Exception {
   if (enabled) {
     sendLargeFile(null, null, id, file, size);
   }
 }