/** * Send the prepared message. * */ private void sendPrepared() { sendPrepared(false); }
/** * Send the prepared message. * */ private void sendPrepared() { sendPrepared(false); }
/** * Send the prepared message. * */ private void sendPrepared() { sendPrepared(false); }
/** * Handle the recovery event. * * None -> None * Active -> Active * Preparing -> Preparing * Committing -> Committing * PreparedSuccess -> PreparedSuccess (resend Prepared) * Aborting -> Aborting */ public void recovery() { final State current ; synchronized(this) { current = state ; } if (current == State.STATE_PREPARED_SUCCESS) { sendPrepared() ; } }
/** * Handle the recovery event. * * None -> None * Active -> Active * Preparing -> Preparing * Committing -> Committing * PreparedSuccess -> PreparedSuccess (resend Prepared) * Aborting -> Aborting */ public void recovery() { final State current ; synchronized(this) { current = state ; } if (current == State.STATE_PREPARED_SUCCESS) { sendPrepared() ; } }
/** * Handle the recovery event. * * None -> None * Active -> Active * Preparing -> Preparing * Committing -> Committing * PreparedSuccess -> PreparedSuccess (resend Prepared) * Aborting -> Aborting */ public void recovery() { final State current ; synchronized(this) { current = state ; } if (current == State.STATE_PREPARED_SUCCESS) { sendPrepared() ; } }
/** * Handle the comms timeout event. * * PreparedSuccess -> PreparedSuccess (resend Prepared) */ private void commsTimeout(TimerTask caller) { final State current ; synchronized(this) { if (timerTask != caller) { // the timer was cancelled but it went off before it could be cancelled return; } // double the resend period up to our maximum limit if (resendPeriod < maxResendPeriod) { resendPeriod = resendPeriod * 14 / 10; // approximately doubles every two resends if (resendPeriod > maxResendPeriod) { resendPeriod = maxResendPeriod; } } current = state ; } if (current == State.STATE_PREPARED_SUCCESS) { sendPrepared() ; } }
/** * Handle the comms timeout event. * * PreparedSuccess -> PreparedSuccess (resend Prepared) */ private void commsTimeout(TimerTask caller) { final State current ; synchronized(this) { if (!timerTask.equals(caller)) { // the timer was cancelled but it went off before it could be cancelled return; } // double the resend period up to our maximum limit if (resendPeriod < maxResendPeriod) { resendPeriod = resendPeriod * 14 / 10; // approximately doubles every two resends if (resendPeriod > maxResendPeriod) { resendPeriod = maxResendPeriod; } } current = state ; } if (current == State.STATE_PREPARED_SUCCESS) { sendPrepared() ; } }
/** * Handle the comms timeout event. * * PreparedSuccess -> PreparedSuccess (resend Prepared) */ private void commsTimeout(TimerTask caller) { final State current ; synchronized(this) { if (!timerTask.equals(caller)) { // the timer was cancelled but it went off before it could be cancelled return; } // double the resend period up to our maximum limit if (resendPeriod < maxResendPeriod) { resendPeriod = resendPeriod * 14 / 10; // approximately doubles every two resends if (resendPeriod > maxResendPeriod) { resendPeriod = maxResendPeriod; } } current = state ; } if (current == State.STATE_PREPARED_SUCCESS) { sendPrepared() ; } }