code: public synchronized void prepared() {
        if (trace) {
           log.tracef("[%s] Current status is %s, setting status to: PREPARED", globalTransaction.globalId(),
                      transactionState);
        }
        transactionState.add(State.PREPARED);
        notifyAll();
     }
docs: mark the transaction as prepared (the validation was finished) and notify a possible pending commit or rollback
  command