Class ReadOption (2.14.1)

public abstract class ReadOption implements Serializable

Specifies options for read operations in Datastore, namely getting/fetching entities and running queries.

Inheritance

java.lang.Object > ReadOption

Implements

Serializable

Static Methods

eventualConsistency()

public static ReadOption.EventualConsistency eventualConsistency()

Returns a ReadOption that specifies eventual consistency, allowing Datastore to return stale results from gets, fetches, and ancestor queries.

Returns
TypeDescription
ReadOption.EventualConsistency

readTime(Timestamp time)

public static ReadOption.ReadTime readTime(Timestamp time)

Returns a ReadOption that specifies read time, allowing Datastore to return results from lookups and queries at a particular timestamp. This feature is currently in private preview.

Parameter
NameDescription
timecom.google.cloud.Timestamp
Returns
TypeDescription
ReadOption.ReadTime

transactionId(ByteString transactionId)

public static ReadOption transactionId(ByteString transactionId)

Returns a ReadOption that specifies transaction id, allowing Datastore to execute a Query in this transaction.

Parameter
NameDescription
transactionIdByteString
Returns
TypeDescription
ReadOption

transactionId(String transactionId)

public static ReadOption transactionId(String transactionId)

Returns a ReadOption that specifies transaction id, allowing Datastore to execute a Query in this transaction.

Parameter
NameDescription
transactionIdString
Returns
TypeDescription
ReadOption