Package com.googlecode.objectify.impl
Class Transactor
- java.lang.Object
-
- com.googlecode.objectify.impl.Transactor
-
public abstract class Transactor extends Object
Determines the transactional behavior of an ObjectifyImpl instance. There are transactional and non-transactional subclasses.- Author:
- Jeff Schnitzer
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_TRY_LIMIT
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description abstract AsyncDatastoreReaderWriter
asyncDatastore(ObjectifyImpl ofy)
abstract <R> R
execute(ObjectifyImpl parent, TxnType txnType, Work<R> work)
abstract AsyncTransaction
getTransaction()
abstract <R> R
transact(ObjectifyImpl parent, Work<R> work)
abstract ObjectifyImpl
transactionless(ObjectifyImpl parent)
Deprecated.abstract <R> R
transactionless(ObjectifyImpl parent, Work<R> work)
abstract <R> R
transactNew(ObjectifyImpl parent, int limitTries, Work<R> work)
-
-
-
Field Detail
-
DEFAULT_TRY_LIMIT
public static final int DEFAULT_TRY_LIMIT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTransaction
public abstract AsyncTransaction getTransaction()
- Returns:
- the transaction appropriate to this transaction state, or null if there is no transaction.
-
transactionless
@Deprecated public abstract ObjectifyImpl transactionless(ObjectifyImpl parent)
Deprecated.- 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
public abstract <R> R execute(ObjectifyImpl parent, TxnType txnType, Work<R> work)
- See Also:
Objectify.execute(TxnType, Work)
-
transactionless
public abstract <R> R transactionless(ObjectifyImpl parent, Work<R> work)
- See Also:
Objectify.transactionless(Work)
-
transact
public abstract <R> R transact(ObjectifyImpl parent, Work<R> work)
- See Also:
Objectify.transact(Work)
-
transactNew
public abstract <R> R transactNew(ObjectifyImpl parent, int limitTries, Work<R> work)
- See Also:
Objectify.transactNew(int, Work)
-
asyncDatastore
public abstract AsyncDatastoreReaderWriter asyncDatastore(ObjectifyImpl ofy)
- Parameters:
ofy
-
-
-