public void uninit ( ) { if ( initialized . get ( ) ) { log . debug ( "Uninit" ) ; if ( writer != null ) { if ( writerFuture != null ) { try { writerFuture . get ( ) ; } catch ( Exception e ) { log . warn ( "Exception waiting for write result on uninit" , e ) ; } if ( writerFuture . cancel ( false ) ) { log . debug ( "Future completed" ) ; } } writerFuture = null ; // write all the queued items doWrites ( ) ; // clear the queue queue . clear ( ) ; queue = null ; // close the writer writer . close ( ) ; writer = null ; } // clear path ref path = null ; } }
Reset or uninitialize