public class TransactorYes<O extends Objectify> extends Transactor<O>
Modifier and Type | Field and Description |
---|---|
protected TransactorNo<O> |
parentTransactor
The non-transactional transactor that spawned us
|
protected Result<TransactionImpl> |
transaction
Our transaction.
|
deferrer, session
Constructor and Description |
---|
TransactorYes(ObjectifyImpl<O> current,
TransactorNo<O> parentTransactor) |
Modifier and Type | Method and Description |
---|---|
void |
committed()
Called when the associated transaction is committed.
|
<R> R |
execute(ObjectifyImpl<O> parent,
TxnType txnType,
Work<R> work) |
TransactionImpl |
getTransaction() |
<R> R |
transact(ObjectifyImpl<O> parent,
Work<R> work) |
ObjectifyImpl<O> |
transactionless(ObjectifyImpl<O> parent)
This version goes back to life without a transaction, but preserves current state regarding deadline, consistency, etc.
|
<R> R |
transactNew(ObjectifyImpl<O> parent,
int limitTries,
Work<R> work)
We need to make sure the parentSession is the transactionless session, not the session
for our transaction.
|
getDeferrer, getSession
protected Result<TransactionImpl> transaction
protected TransactorNo<O extends Objectify> parentTransactor
public TransactorYes(ObjectifyImpl<O> current, TransactorNo<O> parentTransactor)
public TransactionImpl getTransaction()
getTransaction
in class Transactor<O extends Objectify>
public ObjectifyImpl<O> transactionless(ObjectifyImpl<O> parent)
transactionless
in class Transactor<O extends Objectify>
parent
- is the parent objectify instance; the one being transitioned frompublic <R> R execute(ObjectifyImpl<O> parent, TxnType txnType, Work<R> work)
execute
in class Transactor<O extends Objectify>
Objectify.execute(TxnType, Work)
public <R> R transact(ObjectifyImpl<O> parent, Work<R> work)
transact
in class Transactor<O extends Objectify>
Objectify.transact(Work)
public <R> R transactNew(ObjectifyImpl<O> parent, int limitTries, Work<R> work)
transactNew
in class Transactor<O extends Objectify>
Objectify.transactNew(int, Work)
public void committed()
Copyright © 2016. All rights reserved.