public static void writeJournalEntryCheckpoint ( OutputStream output , JournalEntryIterable iterable ) throws IOException , InterruptedException { output = new CheckpointOutputStream ( output , CheckpointType . JOURNAL_ENTRY ) ; Iterator < JournalEntry > it = iterable . getJournalEntryIterator ( ) ; LOG . info ( "Write journal entry checkpoint" ) ; while ( it . hasNext ( ) ) { if ( Thread . interrupted ( ) ) { throw new InterruptedException ( ) ; } it . next ( ) . writeDelimitedTo ( output ) ; } output . flush ( ) ; }
Writes a checkpoint of the entries in the given iterable .