public final void run ( ) { _interrupted = null ; _age = 0 ; while ( true ) { try { _strategy . observe ( _age ) ; if ( _preparation != null ) _preparation . run ( ) ; _result = execute ( ) ; if ( _age > 0 ) { _reporting . emit ( Level . INFO , "Failure recovered: " + toString ( ) , _age , _logger ) ; } break ; } catch ( InterruptedException x ) { _logger . log ( Level . WARNING , "Interrupted, age = " + _age , x ) ; _interrupted = x ; break ; } catch ( Exception x ) { _reporting . emit ( x , "Failure detected, age = " + _age , _age , _logger ) ; try { _strategy . backoff ( _age ) ; } catch ( InterruptedException i ) { _logger . log ( Level . WARNING , "Interrupted, age = " + _age , x ) ; _interrupted = i ; break ; } ++ _age ; } } }
Task entry point .