public < V > Future < V > submitAfter ( Waiter waiter , Callable < V > callable , long timeout , TimeUnit unit ) { AfterTask < V > task = new AfterTask <> ( waiter , callable , timeout , unit ) ; log ( logLevel , "submit after task %s" , task ) ; return ( Future < V > ) submit ( task ) ; }
submits callable after waiting future to complete or timeout to exceed . If timeout exceeds task is cancelled .