public < R > R fold ( Function < ? super T , ? extends R > success , Function < ? super Throwable , ? extends R > failure ) { try { return success . apply ( future . join ( ) ) ; } catch ( Throwable t ) { return failure . apply ( t ) ; } }
Blocking analogue to visitAsync . Visit the state of this Future block until ready .