public synchronized boolean detectRestart ( ) { if ( this . state . hasNotRestarted ( ) ) { resubmissionAttempts = driverRuntimeRestartManager . getResubmissionAttempts ( ) ; if ( resubmissionAttempts > 0 ) { // set the state machine in motion. this . state = DriverRestartState . BEGAN ; } } return this . state . hasRestarted ( ) ; }
Triggers the state machine if the application is a restart instance . Returns true