public Metrics terminate ( ) { if ( ! terminated ) { logger . debug ( "Total milliseconds waiting for chunks: {}, " + "Total memory used: {}, total download time: {} millisec, " + "total parsing time: {} milliseconds, total chunks: {}" , numberMillisWaitingForChunks , Runtime . getRuntime ( ) . totalMemory ( ) , totalMillisDownloadingChunks . get ( ) , totalMillisParsingChunks . get ( ) , chunks . size ( ) ) ; if ( executor != null ) { executor . shutdownNow ( ) ; executor = null ; } chunks = null ; chunkDataCache . clear ( ) ; terminated = true ; return new Metrics ( ) ; } return null ; }
terminate the downloader