public long applyAndJournal ( Supplier < JournalContext > context , NewBlockEntry entry ) { try { long id = applyNewBlock ( entry ) ; context . get ( ) . append ( JournalEntry . newBuilder ( ) . setNewBlock ( entry ) . build ( ) ) ; return id ; } catch ( Throwable t ) { ProcessUtils . fatalError ( LOG , t , "Failed to apply %s" , entry ) ; throw t ; // fatalError will usually system.exit } }
Allocates and returns the next block ID for the indicated inode .