/** * Create a new top-level transaction, under which nested transactions * can be created. * * @param mgr the transaction manager to use for this transaction * @param leaseTime the requested lease time for the transaction * @return the created transaction and the lease granted * * @throws LeaseDeniedException if this manager is unwilling to * grant the requested lease time * @throws RemoteException if a communication error occurs. */ public static NestableTransaction.Created create(NestableTransactionManager mgr, long leaseTime) throws LeaseDeniedException, RemoteException { TransactionManager.Created rawTxn = mgr.create(leaseTime); return new NestableTransaction.Created( new NestableServerTransaction(mgr, rawTxn.id, null), rawTxn.lease); } }
/** * Create a new top-level transaction, under which nested transactions can be created. * * @param mgr the transaction manager to use for this transaction * @param leaseTime the requested lease time for the transaction * @return the created transaction and the lease granted * @throws LeaseDeniedException if this manager is unwilling to grant the requested lease time * @throws RemoteException if a communication error occurs. */ public static NestableTransaction.Created create(NestableTransactionManager mgr, long leaseTime) throws LeaseDeniedException, RemoteException { TransactionManager.Created rawTxn = mgr.create(leaseTime); NestableServerTransaction tx = new NestableServerTransaction(mgr, rawTxn.id, null, leaseTime); return new NestableTransaction.Created(tx, rawTxn.lease); } }
public NestableTransaction.Created create(NestableTransactionManager mgr, long leaseTime) throws UnknownTransactionException, CannotJoinException, LeaseDeniedException, RemoteException { TransactionManager.Created rawTxn = mgr.create((NestableTransactionManager) this.mgr, id, leaseTime); NestableServerTransaction tx = new NestableServerTransaction(mgr, rawTxn.id, this, leaseTime); return new NestableTransaction.Created(tx, rawTxn.lease); }
public NestableTransaction.Created create(NestableTransactionManager mgr, long leaseTime) throws UnknownTransactionException, CannotJoinException, LeaseDeniedException, RemoteException { TransactionManager.Created rawTxn = mgr.create((NestableTransactionManager)this.mgr, id, leaseTime); return new NestableTransaction.Created( new NestableServerTransaction(mgr, rawTxn.id, this), rawTxn.lease); }