Skip to content

Commit 2b10623

Browse files
olavloitekolea2
authored andcommitted
---
yaml --- r: 23121 b: refs/heads/autosynth-containeranalysis c: 620d105 h: refs/heads/master i: 23119: b76e118
1 parent 66a05ca commit 2b10623

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

  • branches/autosynth-containeranalysis/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ refs/heads/autosynth-bigquerydatatransfer: d88aa5aae5fd9d3c6d75bbab1a05162c6d4d9
126126
refs/heads/autosynth-bigquerystorage: d2c53da3b012e38c662e4df0738042435f19365f
127127
refs/heads/autosynth-bigtable: 9e5429f45cf9face9fed585d0233534993e36b58
128128
refs/heads/autosynth-bigtable-admin: 6379a2bc712f2736c83de0e009b4d26da4fa82ca
129-
refs/heads/autosynth-containeranalysis: 249d1636213be23efd68c92c08252e8b1ed930d6
129+
refs/heads/autosynth-containeranalysis: 620d105e6b574cfeeee04e413a157b7bd34ebc8b
130130
refs/heads/autosynth-datastore: 9acd400b484d6691a080c9152a331d88d24fefc1
131131
refs/heads/autosynth-dialogflow: 7dbc2c1ea714328ccfa4f33645045f017ff080e7
132132
refs/heads/autosynth-errorreporting: 1101a04e8be074802c35332d5fcf8297f61cae32

branches/autosynth-containeranalysis/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClient.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ public interface DatabaseClient {
8585

8686
/**
8787
* Returns a context in which a single read can be performed using {@link TimestampBound#strong()}
88-
* concurrency.
88+
* concurrency. This method will return a {@link ReadContext} that will not return the read
89+
* timestamp that was used by Cloud Spanner. If you want to be able to access the read timestamp,
90+
* you should use the method {@link #singleUseReadOnlyTransaction()}.
8991
*
9092
* <p>Example of single use.
9193
*
@@ -100,17 +102,18 @@ public interface DatabaseClient {
100102
ReadContext singleUse();
101103

102104
/**
103-
* Returns a context in which a single read can be performed at the given timestamp bound.
105+
* Returns a context in which a single read can be performed at the given timestamp bound. This
106+
* method will return a {@link ReadContext} that will not return the read timestamp that was used
107+
* by Cloud Spanner. If you want to be able to access the read timestamp, you should use the
108+
* method {@link #singleUseReadOnlyTransaction()}.
104109
*
105110
* <p>Example of single use with timestamp bound.
106111
*
107112
* <pre>{@code
108113
* long singerId = my_singer_id;
109114
* String column = "FirstName";
110-
* Struct row =
111-
* dbClient
112-
* .singleUse(TimestampBound.ofMaxStaleness(10, TimeUnit.SECONDS))
113-
* .readRow("Singers", Key.of(singerId), Collections.singleton(column));
115+
* Struct row = dbClient.singleUse(TimestampBound.ofMaxStaleness(10, TimeUnit.SECONDS))
116+
* .readRow("Singers", Key.of(singerId), Collections.singleton(column));
114117
* String firstName = row.getString(column);
115118
* }</pre>
116119
*

0 commit comments

Comments
 (0)