|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.googlecode.objectify.ObjectifyOpts
public class ObjectifyOpts
The options available when creating an Objectify instance.
The default options are:
Constructor Summary | |
---|---|
ObjectifyOpts()
|
Method Summary | |
---|---|
ObjectifyOpts |
clone()
Make a copy of this object as-is. |
boolean |
getBeginTransaction()
Gets the current value of beginTransaction |
com.google.appengine.api.datastore.ReadPolicy.Consistency |
getConsistency()
Gets the initial consistency setting for the Objectify instance |
java.lang.Double |
getDeadline()
Gets the deadline for datastore calls, in seconds |
boolean |
getGlobalCache()
Gets whether or not the Objectify instance will use a 2nd-level memcache |
boolean |
getSessionCache()
Gets whether or not the Objectify instance will maintain a session cache |
ObjectifyOpts |
setBeginTransaction(boolean value)
Sets whether or not the Objectify instance will start a transaction. |
ObjectifyOpts |
setConsistency(com.google.appengine.api.datastore.ReadPolicy.Consistency value)
Sets the initial consistency value for the Objectify instance. |
ObjectifyOpts |
setDeadline(java.lang.Double value)
Sets a limit, in seconds, for datastore calls. |
ObjectifyOpts |
setGlobalCache(boolean value)
Sets whether or not the Objectify instance will use a 2nd-level memcache. |
ObjectifyOpts |
setSessionCache(boolean value)
Sets whether or not the Objectify instance will maintain a session cache. |
ObjectifyOpts |
setTransactionOptions(com.google.appengine.api.datastore.TransactionOptions opts)
Set options for a transaction to start, or null for no transaction. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectifyOpts()
Method Detail |
---|
public boolean getBeginTransaction()
public ObjectifyOpts setBeginTransaction(boolean value)
setBeginTransaction(true)
is equivalent
to setTransactionOptions(TransactionOptions.Builder.withXG(true))
.
There is no overhead for XG transactions on a single entity group, so there is
no good reason to ever have this false.
public ObjectifyOpts setTransactionOptions(com.google.appengine.api.datastore.TransactionOptions opts)
setBeginTransaction(true)
instead.
public boolean getSessionCache()
public ObjectifyOpts setSessionCache(boolean value)
public boolean getGlobalCache()
public ObjectifyOpts setGlobalCache(boolean value)
public com.google.appengine.api.datastore.ReadPolicy.Consistency getConsistency()
public ObjectifyOpts setConsistency(com.google.appengine.api.datastore.ReadPolicy.Consistency value)
public java.lang.Double getDeadline()
public ObjectifyOpts setDeadline(java.lang.Double value)
value
- can be null to indicate no deadline (other than the standard whole
request deadline of 30s).public ObjectifyOpts clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |