Package com.google.cloud.firestore
Class TransactionOptions.ReadOnlyOptionsBuilder
java.lang.Object
com.google.cloud.firestore.TransactionOptions.Builder<TransactionOptions.ReadOnlyOptionsBuilder>
com.google.cloud.firestore.TransactionOptions.ReadOnlyOptionsBuilder
- Enclosing class:
- TransactionOptions
public static final class TransactionOptions.ReadOnlyOptionsBuilder
extends TransactionOptions.Builder<TransactionOptions.ReadOnlyOptionsBuilder>
A typesafe builder class representing those options that are applicable when configuring a
transaction to be read-only. All methods function as "set" rather than returning a new copy
with a value set on it.
-
Field Summary
Fields inherited from class com.google.cloud.firestore.TransactionOptions.Builder
executor -
Method Summary
Modifier and TypeMethodDescriptionbuild()com.google.protobuf.TimestampOrBuildersetReadTime(com.google.protobuf.TimestampOrBuilder readTime) Specify to read documents at the given time.Methods inherited from class com.google.cloud.firestore.TransactionOptions.Builder
getExecutor, setExecutor
-
Method Details
-
getReadTime
- Returns:
- the currently set value that will be used as the readTime.
-
setReadTime
@Nonnull public TransactionOptions.ReadOnlyOptionsBuilder setReadTime(@Nullable com.google.protobuf.TimestampOrBuilder readTime) Specify to read documents at the given time. This may not be more than 60 minutes in the past from when the request is processed by the server.- Parameters:
readTime- The specific time to read documents at. Must not be older than 60 minutes. A null value means read most up to date data.- Returns:
thisbuilder
-
build
- Specified by:
buildin classTransactionOptions.Builder<TransactionOptions.ReadOnlyOptionsBuilder>- Returns:
- an instance of
TransactionOptionsfrom the values passed to this builder
-