void successfulBoot ( ) throws ConfigurationPersistenceException { synchronized ( this ) { if ( doneBootup . get ( ) ) { return ; } final File copySource ; if ( ! interactionPolicy . isReadOnly ( ) ) { copySource = mainFile ; } else { if ( FilePersistenceUtils . isParentFolderWritable ( mainFile ) ) { copySource = new File ( mainFile . getParentFile ( ) , mainFile . getName ( ) + ".boot" ) ; } else { copySource = new File ( configurationDir , mainFile . getName ( ) + ".boot" ) ; } FilePersistenceUtils . deleteFile ( copySource ) ; } try { if ( ! bootFile . equals ( copySource ) ) { FilePersistenceUtils . copyFile ( bootFile , copySource ) ; } createHistoryDirectory ( ) ; final File historyBase = new File ( historyRoot , mainFile . getName ( ) ) ; lastFile = addSuffixToFile ( historyBase , LAST ) ; final File boot = addSuffixToFile ( historyBase , BOOT ) ; final File initial = addSuffixToFile ( historyBase , INITIAL ) ; if ( ! initial . exists ( ) ) { FilePersistenceUtils . copyFile ( copySource , initial ) ; } FilePersistenceUtils . copyFile ( copySource , lastFile ) ; FilePersistenceUtils . copyFile ( copySource , boot ) ; } catch ( IOException e ) { throw ControllerLogger . ROOT_LOGGER . failedToCreateConfigurationBackup ( e , bootFile ) ; } finally { if ( interactionPolicy . isReadOnly ( ) ) { //Delete the temporary file try { FilePersistenceUtils . deleteFile ( copySource ) ; } catch ( Exception ignore ) { } } } doneBootup . set ( true ) ; } }
Notification that boot has completed successfully and the configuration history should be updated