private TransactionBroadcaster getBroadcaster ( ) { try { return broadcasterFuture . get ( MAX_SECONDS_TO_WAIT_FOR_BROADCASTER_TO_BE_SET , TimeUnit . SECONDS ) ; } catch ( InterruptedException e ) { throw new RuntimeException ( e ) ; } catch ( ExecutionException e ) { throw new RuntimeException ( e ) ; } catch ( TimeoutException e ) { String err = "Transaction broadcaster not set" ; log . error ( err ) ; throw new RuntimeException ( err , e ) ; } }
If the broadcaster has not been set for MAX_SECONDS_TO_WAIT_FOR_BROADCASTER_TO_BE_SET seconds then the programmer probably forgot to set it and we should throw exception .