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
Nested ClassesModifier and TypeClassDescriptionstatic final classSpecifies eventual consistency for reads from Datastore.static classReadOption.QueryConfig<Q extends Query<?>>static final classReads entities as they were at the given time. -
Method Summary
Modifier and TypeMethodDescriptionReturns 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 Details
-
eventualConsistency
Returns aReadOptionthat specifies eventual consistency, allowing Datastore to return stale results from gets, fetches, and ancestor queries. -
readTime
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
Returns aReadOptionthat specifies transaction id, allowing Datastore to execute aQueryin this transaction. -
transactionId
Returns aReadOptionthat specifies transaction id, allowing Datastore to execute aQueryin this transaction.
-