void processGroovyFiles ( List < File > aFiles ) throws Exception { List < Callable < Boolean >> tasks = new ArrayList <> ( ) ; for ( File file : aFiles ) { tasks . add ( ( ) -> { try { return filterLoader . putFilter ( file ) ; } catch ( Exception e ) { LOG . error ( "Error loading groovy filter from disk! file = " + String . valueOf ( file ) , e ) ; return false ; } } ) ; } processFilesService . invokeAll ( tasks , FILE_PROCESSOR_TASKS_TIMEOUT_SECS . get ( ) , TimeUnit . SECONDS ) ; }
puts files into the FilterLoader . The FilterLoader will only add new or changed filters