private synchronized void closeActiveFile ( ) { StringWriterFile activeFile = this . activeFile ; try { this . activeFile = null ; if ( activeFile != null ) { activeFile . close ( ) ; getPolicy ( ) . closeActiveFile ( activeFile . path ( ) ) ; activeFile = null ; } } catch ( IOException e ) { trace . error ( "error closing active file '{}'" , activeFile . path ( ) , e ) ; } }
close , finalize , and apply retention policy