/** * Enter a new Transaction, this method should return false if this object * is already enlisted in another transaction, or cannot be enlisted with * the passed transaction. If the object returns true, the object * is enlisted in the passed transaction and cannot be enlisted in another * transaction until either commit or abort has been issued. * * @param t the transaction to enlist with * @return true if the enlisting with the passed transaction was accepted, * false otherwise */ public synchronized boolean join(Transaction t) { if (currentTx==null) { currentTx = t; t.addParticipant(this); return true; } return false; }
/** * Enter a new Transaction, this method should return false if this object * is already enlisted in another transaction, or cannot be enlisted with * the passed transaction. If the object returns true, the object * is enlisted in the passed transaction and cannot be enlisted in another * transaction until either commit or abort has been issued. * * @param t the transaction to enlist with * @return true if the enlisting with the passed transaction was accepted, * false otherwise */ public synchronized boolean join(Transaction t) { if (currentTx==null) { currentTx = t; t.addParticipant(this); return true; } return false; }
/** * Enter a new Transaction, this method should return false if this object * is already enlisted in another transaction, or cannot be enlisted with * the passed transaction. If the object returns true, the object * is enlisted in the passed transaction and cannot be enlisted in another * transaction until either commit or abort has been issued. * * @param t the transaction to enlist with * @return true if the enlisting with the passed transaction was accepted, * false otherwise */ public synchronized boolean join(Transaction t) { if (currentTx==null) { currentTx = t; t.addParticipant(this); return true; } return false; }
/** * Enter a new Transaction, this method should return false if this object * is already enlisted in another transaction, or cannot be enlisted with * the passed transaction. If the object returns true, the object * is enlisted in the passed transaction and cannot be enlisted in another * transaction until either commit or abort has been issued. * * @param t the transaction to enlist with * @return true if the enlisting with the passed transaction was accepted, * false otherwise */ public synchronized boolean join(Transaction t) { if (currentTx==null) { currentTx = t; t.addParticipant(this); return true; } return false; }
/** * Enter a new Transaction, this method should return false if this object * is already enlisted in another transaction, or cannot be enlisted with * the passed transaction. If the object returns true, the object * is enlisted in the passed transaction and cannot be enlisted in another * transaction until either commit or abort has been issued. * * @param t the transaction to enlist with * @return true if the enlisting with the passed transaction was accepted, * false otherwise */ public synchronized boolean join(Transaction t) { if (currentTx==null) { currentTx = t; t.addParticipant(this); return true; } return false; }