waits if necessary for at most the given time for the command handling to complete , and then retrieves its result , if available . concode_field_sep R result concode_elem_sep CountDownLatch latch concode_elem_sep Throwable failure concode_field_sep boolean cancel concode_elem_sep boolean isCancelled concode_elem_sep R getResult concode_elem_sep R getResult concode_elem_sep void onFailure concode_elem_sep R getFutureResult concode_elem_sep R doGetResult concode_elem_sep boolean awaitCompletion concode_elem_sep boolean isDone concode_elem_sep void onSuccess
R function ( long arg0 , TimeUnit arg1 ) { if ( ! isDone ( ) && ! latch . await ( arg0 , arg1 ) ) { throw new TimeoutException ( "srini_string" ) ; } return getFutureResult ( ) ; }