Package com.google.cloud.datastore
Class ReadOption
- java.lang.Object
-
- com.google.cloud.datastore.ReadOption
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ReadOption.EventualConsistency,ReadOption.ReadTime
public abstract class ReadOption extends Object implements Serializable
Specifies options for read operations in Datastore, namely getting/fetching entities and running queries.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classReadOption.EventualConsistencySpecifies eventual consistency for reads from Datastore.static classReadOption.QueryAndReadOptions<Q extends Query<?>>static classReadOption.ReadTimeReads entities as they were at the given time.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ReadOption.EventualConsistencyeventualConsistency()Returns aReadOptionthat specifies eventual consistency, allowing Datastore to return stale results from gets, fetches, and ancestor queries.static ReadOption.ReadTimereadTime(com.google.cloud.Timestamp time)Returns aReadOptionthat specifies read time, allowing Datastore to return results from lookups and queries at a particular timestamp.static ReadOptiontransactionId(com.google.protobuf.ByteString transactionId)Returns aReadOptionthat specifies transaction id, allowing Datastore to execute aQueryin this transaction.static ReadOptiontransactionId(String transactionId)Returns aReadOptionthat specifies transaction id, allowing Datastore to execute aQueryin this transaction.
-
-
-
Method Detail
-
eventualConsistency
public static ReadOption.EventualConsistency eventualConsistency()
Returns aReadOptionthat specifies eventual consistency, allowing Datastore to return stale results from gets, fetches, and ancestor queries.
-
readTime
@BetaApi public static ReadOption.ReadTime readTime(com.google.cloud.Timestamp time)
Returns aReadOptionthat specifies read time, allowing Datastore to return results from lookups and queries at a particular timestamp. This feature is currently in private preview.
-
transactionId
@InternalApi public static ReadOption transactionId(String transactionId)
Returns aReadOptionthat specifies transaction id, allowing Datastore to execute aQueryin this transaction.
-
transactionId
@InternalApi public static ReadOption transactionId(com.google.protobuf.ByteString transactionId)
Returns aReadOptionthat specifies transaction id, allowing Datastore to execute aQueryin this transaction.
-
-