/** * Handle the readOnly decision event. * * Active -> None (send ReadOnly) * Preparing -> None (send ReadOnly) */ private void readOnlyDecision() { final State current ; synchronized(this) { current = state ; if ((current == State.STATE_ACTIVE) || (current == State.STATE_PREPARING)) { state = null ; } } if ((current == State.STATE_ACTIVE) || (current == State.STATE_PREPARING)) { sendReadOnly() ; forget() ; } }
/** * Handle the readOnly decision event. * * Active -> None (send ReadOnly) * Preparing -> None (send ReadOnly) */ private void readOnlyDecision() { final State current ; synchronized(this) { current = state ; if ((current == State.STATE_ACTIVE) || (current == State.STATE_PREPARING)) { state = null ; } } if ((current == State.STATE_ACTIVE) || (current == State.STATE_PREPARING)) { sendReadOnly() ; forget() ; } }
/** * Handle the rollback decision event. * * Active -> Aborting (send aborted) * Preparing -> Aborting (send aborted) */ private void rollbackDecision() { final State current ; synchronized(this) { current = state ; if ((current == State.STATE_PREPARING) || (current == State.STATE_ACTIVE)) { state = State.STATE_ABORTING ; } } if ((current == State.STATE_PREPARING) || (current == State.STATE_ACTIVE)) { sendAborted() ; forget() ; } }
/** * Handle the rollback decision event. * * Active -> Aborting (send aborted) * Preparing -> Aborting (send aborted) */ private void rollbackDecision() { final State current ; synchronized(this) { current = state ; if ((current == State.STATE_PREPARING) || (current == State.STATE_ACTIVE)) { state = State.STATE_ABORTING ; } } if ((current == State.STATE_PREPARING) || (current == State.STATE_ACTIVE)) { sendAborted() ; forget() ; } }
/** * Handle the readOnly decision event. * * Active -> None (send ReadOnly) * Preparing -> None (send ReadOnly) */ private void readOnlyDecision() { final State current ; synchronized(this) { current = state ; if ((current == State.STATE_ACTIVE) || (current == State.STATE_PREPARING)) { state = null ; } } if ((current == State.STATE_ACTIVE) || (current == State.STATE_PREPARING)) { sendReadOnly() ; forget() ; } }
/** * Handle the rollback decision event. * * Active -> Aborting (send aborted) * Preparing -> Aborting (send aborted) */ private void rollbackDecision() { final State current ; synchronized(this) { current = state ; if ((current == State.STATE_PREPARING) || (current == State.STATE_ACTIVE)) { state = State.STATE_ABORTING ; } } if ((current == State.STATE_PREPARING) || (current == State.STATE_ACTIVE)) { sendAborted() ; forget() ; } }