public void shutdown(){
  logger.info("Shutting down scanner.");
  executor.shutdown();
}

public void shutdown ( ) { logger . info ( "Shutting down scanner." ) ; executor . shutdown ( ) ; }
shut down the scanner , waiting for all previously queued tasks to complete . this method should be called to free up resources when the scanner is no longer needed .
