public CompletableFuture<NewFile> run(){
  LOG.log(Level.FINE,"starting optimized file creation for {0} files",files.size());
  CompletableFuture<NewFile> fileCreation=new CompletableFuture<>();
  final List<TSData> fjpFiles=this.files;
  TASK_POOL.execute(null);
synchronized (OUTSTANDING) {
    OUTSTANDING.add(fileCreation);
  }
  this.files=new LinkedList<>();
  return fileCreation;
}

public CompletableFuture < NewFile > run ( ) { LOG . log ( Level . FINE , "starting optimized file creation for {0} files" , files . size ( ) ) ; CompletableFuture < NewFile > fileCreation = new CompletableFuture < > ( ) ; final List < TSData > fjpFiles = this . files ; TASK_POOL . execute ( null ) ; synchronized ( OUTSTANDING ) { OUTSTANDING . add ( fileCreation ) ; } this . files = new LinkedList < > ( ) ; return fileCreation ; }
start creating the optimized file . this operation resets the state of the optimizer task , so it can be re - used for subsequent invocations .
