Skip to content

Commit 2030f27

Browse files
committed
fix: doc errors.
1 parent 32c6122 commit 2030f27

File tree

3 files changed

+22
-24
lines changed

3 files changed

+22
-24
lines changed

google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncResultSet.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,17 @@ enum CallbackResponse {
6060
CONTINUE,
6161

6262
/**
63-
* Tell the cursor to suspend all callbacks until application calls {@link RowCursor#resume()}.
63+
* Tell the cursor to suspend all callbacks until application calls {@link
64+
* ForwardingAsyncResultSet#resume()}.
6465
*/
6566
PAUSE,
6667

6768
/**
6869
* Tell the cursor you are done receiving results, even if there are more results sitting in the
6970
* buffer. Once you return DONE, you will receive no further callbacks.
7071
*
71-
* <p>Approximately equivalent to calling {@link RowCursor#cancel()}, and then returning {@code
72-
* PAUSE}, but more clear, immediate, and idiomatic.
72+
* <p>Approximately equivalent to calling {@link ForwardingAsyncResultSet#cancel()}, and then
73+
* returning {@code PAUSE}, but more clear, immediate, and idiomatic.
7374
*
7475
* <p>It is legal to commit a transaction that owns this read before actually returning {@code
7576
* DONE}.
@@ -105,11 +106,12 @@ interface ReadyCallback {
105106
* <li>Callback will stop being called once any of the following occurs:
106107
* <ol>
107108
* <li>Callback returns {@link CallbackResponse#DONE}.
108-
* <li>{@link ResultSet#tryNext()} returns {@link CursorState#DONE}.
109-
* <li>{@link ResultSet#tryNext()} throws an exception.
109+
* <li>{@link ForwardingAsyncResultSet#tryNext()} returns {@link CursorState#DONE}.
110+
* <li>{@link ForwardingAsyncResultSet#tryNext()} throws an exception.
110111
* </ol>
111-
* <li>Callback may possibly be invoked after a call to {@link ResultSet#cancel()} call, but the
112-
* subsequent call to {@link #tryNext()} will yield a SpannerException.
112+
* <li>Callback may possibly be invoked after a call to {@link
113+
* ForwardingAsyncResultSet#cancel()} call, but the subsequent call to {@link #tryNext()}
114+
* will yield a SpannerException.
113115
* <li>Spurious callbacks are possible where cursors are not actually ready. Typically callback
114116
* should return {@link CallbackResponse#CONTINUE} any time it sees {@link
115117
* CursorState#NOT_READY}.

google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncTransactionManager.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import com.google.api.core.ApiFuture;
2020
import com.google.cloud.Timestamp;
21-
import com.google.cloud.spanner.AsyncTransactionManager.TransactionContextFuture;
21+
import com.google.cloud.spanner.Options.TransactionOption;
2222
import com.google.cloud.spanner.TransactionManager.TransactionState;
2323
import com.google.common.util.concurrent.ListenableFuture;
2424
import com.google.common.util.concurrent.MoreExecutors;
@@ -43,7 +43,7 @@
4343
* so can cause resources to be leaked and deadlocks. Easiest way to guarantee this is by calling
4444
* {@link #close()} in a finally block.
4545
*
46-
* @see DatabaseClient#transactionManagerAsync()
46+
* @see DatabaseClient#transactionManagerAsync(TransactionOption...)
4747
*/
4848
public interface AsyncTransactionManager extends AutoCloseable {
4949
/**
@@ -91,10 +91,10 @@ Timestamp get(long timeout, TimeUnit unit)
9191

9292
/**
9393
* {@link AsyncTransactionStep} is returned by {@link
94-
* TransactionContextFuture#then(AsyncTransactionFunction)} and {@link
95-
* AsyncTransactionStep#then(AsyncTransactionFunction)} and allows transaction steps that should
96-
* be executed serially to be chained together. Each step can contain one or more statements that
97-
* may execute in parallel.
94+
* TransactionContextFuture#then(AsyncTransactionFunction, Executor)} and {@link
95+
* AsyncTransactionStep#then(AsyncTransactionFunction, Executor)} and allows transaction steps
96+
* that should be executed serially to be chained together. Each step can contain one or more
97+
* statements that may execute in parallel.
9898
*
9999
* <p>Example usage:
100100
*
@@ -151,16 +151,16 @@ interface AsyncTransactionFunction<I, O> {
151151
* @param input the result of the previous transaction step.
152152
* @return an {@link ApiFuture} that will return the result of this step, and that will be the
153153
* input of the next transaction step. This method should never return <code>null</code>.
154-
* Instead, if the method does not have a return value, the method should return {@link
155-
* ApiFutures#immediateFuture(null)}.
154+
* Instead, if the method does not have a return value, the method should return
155+
* ApiFutures#immediateFuture(null).
156156
*/
157157
ApiFuture<O> apply(TransactionContext txn, I input) throws Exception;
158158
}
159159

160160
/**
161161
* Creates a new read write transaction. This must be called before doing any other operation and
162162
* can only be called once. To create a new transaction for subsequent retries, see {@link
163-
* #resetForRetry()}.
163+
* #resetForRetryAsync()}.
164164
*/
165165
TransactionContextFuture beginAsync();
166166

google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import com.google.cloud.grpc.GcpManagedChannelOptions;
3333
import com.google.cloud.grpc.GrpcTransportOptions;
3434
import com.google.cloud.spanner.Options.QueryOption;
35+
import com.google.cloud.spanner.Options.UpdateOption;
3536
import com.google.cloud.spanner.admin.database.v1.DatabaseAdminSettings;
3637
import com.google.cloud.spanner.admin.database.v1.stub.DatabaseAdminStubSettings;
3738
import com.google.cloud.spanner.admin.instance.v1.InstanceAdminSettings;
@@ -134,10 +135,7 @@ public class SpannerOptions extends ServiceOptions<Spanner, SpannerOptions> {
134135
private final String compressorName;
135136
private final boolean leaderAwareRoutingEnabled;
136137

137-
/**
138-
* Interface that can be used to provide {@link CallCredentials} instead of {@link Credentials} to
139-
* {@link SpannerOptions}.
140-
*/
138+
/** Interface that can be used to provide {@link CallCredentials} to {@link SpannerOptions}. */
141139
public interface CallCredentialsProvider {
142140
/** Return the {@link CallCredentials} to use for a gRPC call. */
143141
CallCredentials getCallCredentials();
@@ -970,7 +968,7 @@ public DatabaseAdminStubSettings.Builder getDatabaseAdminStubSettingsBuilder() {
970968

971969
/**
972970
* Sets a timeout specifically for Partitioned DML statements executed through {@link
973-
* DatabaseClient#executePartitionedUpdate(Statement)}. The default is 2 hours.
971+
* DatabaseClient#executePartitionedUpdate(Statement, UpdateOption...)}. The default is 2 hours.
974972
*/
975973
public Builder setPartitionedDmlTimeout(Duration timeout) {
976974
this.partitionedDmlTimeout = timeout;
@@ -1065,9 +1063,7 @@ QueryOptions getEnvironmentQueryOptions() {
10651063

10661064
/**
10671065
* Sets a {@link CallCredentialsProvider} that can deliver {@link CallCredentials} to use on a
1068-
* per-gRPC basis. Any credentials returned by this {@link CallCredentialsProvider} will have
1069-
* preference above any {@link Credentials} that may have been set on the {@link SpannerOptions}
1070-
* instance.
1066+
* per-gRPC basis.
10711067
*/
10721068
public Builder setCallCredentialsProvider(CallCredentialsProvider callCredentialsProvider) {
10731069
this.callCredentialsProvider = callCredentialsProvider;

0 commit comments

Comments
 (0)