public synchronized boolean isHealthy ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "isHealthy" ) ; boolean retval = _running && ! _stopRequested && ( _threadWriteErrorsOutstanding == 0 ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "isHealthy" , Boolean . valueOf ( retval ) ) ; return retval ; }
Used as a quick way to check the health of a dispatcher before giving it work in situations in which the work cannot be rejected . For example for a transaction which requires both synchronous and asynchronous persistence once we ve done the synchronous persistence a transient persistence problem from a dispatcher will not be reported from the dispatching method because we cannot guarantee to roll back the synchronous work .