protected void force ( ) throws InternalLogException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "force" , this ) ; try { if ( _isMapped ) { // Note: on Win2K we can get an IOException from this even though it is not declared ( ( MappedByteBuffer ) _fileBuffer ) . force ( ) ; } else { // Write the "pending" WritableLogRecords. writePendingToFile ( ) ; _fileChannel . force ( false ) ; } } catch ( java . io . IOException ioe ) { FFDCFilter . processException ( ioe , "com.ibm.ws.recoverylog.spi.LogFileHandle.force" , "1049" , this ) ; _exceptionInForce = true ; if ( tc . isEventEnabled ( ) ) Tr . event ( tc , "Unable to force file " + _fileName ) ; // d453958: moved terminateserver code to MultiScopeRecoveryLog.markFailed method. if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "force" , "InternalLogException" ) ; throw new InternalLogException ( ioe ) ; } catch ( InternalLogException exc ) { FFDCFilter . processException ( exc , "com.ibm.ws.recoverylog.spi.LogFileHandle.force" , "1056" , this ) ; _exceptionInForce = true ; if ( tc . isEventEnabled ( ) ) Tr . event ( tc , "Unable to force file " + _fileName ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "force" , "InternalLogException" ) ; throw exc ; } catch ( LogIncompatibleException exc ) { FFDCFilter . processException ( exc , "com.ibm.ws.recoverylog.spi.LogFileHandle.force" , "1096" , this ) ; _exceptionInForce = true ; if ( tc . isEventEnabled ( ) ) Tr . event ( tc , "Unable to force file " + _fileName ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "force" , "InternalLogException" ) ; throw new InternalLogException ( exc ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "force" ) ; }
Forces the contents of the memory - mapped view of the log file to disk . Having invoked this method the caller can be certain that any data added to the log as part of a prior log write is now stored persistently on disk .