question: public void accept ( final Path file ) throws InterruptedException { logger . info ( String . format ( "Sending to thread pool; will queue if full: \"%s\"." , file ) ) ; permits . acquire ( ) ; executor . execute ( new ConsumerTask ( file ) ) ; }
target:  Consume a file. Jobs are put in an bounded queue and executed in serial, in a separate thread. This method blocks when the queue bound is reached to avoid flooding the consumer.