Skip to content

Commit 640507d

Browse files
olavloitekolea2
authored andcommitted
---
yaml --- r: 18659 b: refs/heads/autosynth-monitoring c: 620d105 h: refs/heads/master i: 18657: b32043a 18655: 2d313e4
1 parent 98abe5e commit 640507d

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

  • branches/autosynth-monitoring/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
@@ -114,7 +114,7 @@ refs/tags/v0.66.0: ed6a3f57cbdaa20339a1995f7d7d53b172a5b8ef
114114
refs/tags/v0.67.0: 30b56f02092efc6f3c3667650ea8b8825003e0b7
115115
refs/heads/autosynth-compute: afe19e1678334117f3daf13b968b667857f7c8ca
116116
refs/heads/autosynth-container: f6384095f50b31bfc8208542a49181e158d3681c
117-
refs/heads/autosynth-monitoring: 249d1636213be23efd68c92c08252e8b1ed930d6
117+
refs/heads/autosynth-monitoring: 620d105e6b574cfeeee04e413a157b7bd34ebc8b
118118
refs/heads/autosynth-pubsub: fd363d13793a853214eb8193c922b28c54e7a6b3
119119
refs/heads/autosynth-video-intelligence: e44c9746407fe00fac42e1bb10ac50f493dd37b0
120120
refs/heads/autosynth-vision: b8e47d76578b5f150ef530072ea7e485e2b02ca0

branches/autosynth-monitoring/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)