public void close ( ) throws WikiApiException { try { this . revisionIndex . finalizeIndex ( ) ; this . chronoIndex . finalizeIndex ( ) ; info . setEndRevisionCount ( lastRev . getRevisionCounter ( ) ) ; this . infoList . add ( info ) ; this . articleIndex . add ( currentArticleID , startTime , endTime , infoList ) ; this . articleIndex . finalizeIndex ( ) ; send ( ) ; this . indexWriter . finish ( ) ; if ( connection != null ) { this . connection . close ( ) ; } } catch ( SQLException sql ) { sql . printStackTrace ( ) ; throw new WikiApiException ( sql ) ; } catch ( IOException sql ) { sql . printStackTrace ( ) ; throw new WikiApiException ( sql ) ; } }
Finalizes the indices and sends the rest of the data to the output . Afterwards the database connection will be closed .