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
Specifies options for read operations in Datastore, namely getting/fetching entities and running
queries.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Specifies eventual consistency for reads from Datastore.static class
ReadOption.QueryAndReadOptions<Q extends Query<?>>
static final class
Reads entities as they were at the given time. -
Method Summary
Modifier and TypeMethodDescriptionReturns aReadOption
that specifies eventual consistency, allowing Datastore to return stale results from gets, fetches, and ancestor queries.static ReadOption.ReadTime
readTime
(com.google.cloud.Timestamp time) Returns aReadOption
that specifies read time, allowing Datastore to return results from lookups and queries at a particular timestamp.static ReadOption
transactionId
(com.google.protobuf.ByteString transactionId) Returns aReadOption
that specifies transaction id, allowing Datastore to execute aQuery
in this transaction.static ReadOption
transactionId
(String transactionId) Returns aReadOption
that specifies transaction id, allowing Datastore to execute aQuery
in this transaction.
-
Method Details
-
eventualConsistency
Returns aReadOption
that specifies eventual consistency, allowing Datastore to return stale results from gets, fetches, and ancestor queries. -
readTime
Returns aReadOption
that specifies read time, allowing Datastore to return results from lookups and queries at a particular timestamp. This feature is currently in private preview. -
transactionId
Returns aReadOption
that specifies transaction id, allowing Datastore to execute aQuery
in this transaction. -
transactionId
Returns aReadOption
that specifies transaction id, allowing Datastore to execute aQuery
in this transaction.
-