Package com.googlecode.objectify.impl
Class Transactor<O extends Objectify>
java.lang.Object
com.googlecode.objectify.impl.Transactor<O>
- Direct Known Subclasses:
TransactorNo
,TransactorYes
public abstract class Transactor<O extends Objectify> extends Object
Determines the transactional behavior of an ObjectifyImpl instance. There are transactional and non-transactional
subclasses.
- Author:
- Jeff Schnitzer
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTransactor(Objectify ofy)
Construct a transactor with a fresh sessionTransactor(Objectify ofy, Session session)
Construct a transactor with an explicit session -
Method Summary
Modifier and TypeMethodDescriptionabstract <R> R
execute(ObjectifyImpl<O> parent, TxnType txnType, Work<R> work)
abstract TransactionImpl
abstract <R> R
transact(ObjectifyImpl<O> parent, Work<R> work)
abstract ObjectifyImpl<O>
transactionless(ObjectifyImpl<O> parent)
abstract <R> R
transactNew(ObjectifyImpl<O> parent, int limitTries, Work<R> work)
-
Field Details
-
session
Our session -
deferrer
Any deferred operations
-
-
Constructor Details
-
Transactor
Construct a transactor with a fresh session -
Transactor
Construct a transactor with an explicit session
-
-
Method Details
-
getSession
- Returns:
- the session associated with this transaction state
-
getDeferrer
- Returns:
- the deferred operations in this context
-
getTransaction
- Returns:
- the transaction appropriate to this transaction state, or null if there is no transaction.
-
transactionless
- Parameters:
parent
- is the parent objectify instance; the one being transitioned from- Returns:
- an Objectify instance that is suitable for transactionless execution. In the case of a transactor which is not in a transaction, probably this is the same as getObjectify().
-
execute
- See Also:
Objectify.execute(TxnType, Work)
-
transact
- See Also:
Objectify.transact(Work)
-
transactNew
- See Also:
Objectify.transactNew(int, Work)
-