|
18 | 18 |
|
19 | 19 | import com.google.api.core.ApiFuture;
|
20 | 20 | import com.google.cloud.Timestamp;
|
21 |
| -import com.google.cloud.spanner.AsyncTransactionManager.TransactionContextFuture; |
| 21 | +import com.google.cloud.spanner.Options.TransactionOption; |
22 | 22 | import com.google.cloud.spanner.TransactionManager.TransactionState;
|
23 | 23 | import com.google.common.util.concurrent.ListenableFuture;
|
24 | 24 | import com.google.common.util.concurrent.MoreExecutors;
|
|
43 | 43 | * so can cause resources to be leaked and deadlocks. Easiest way to guarantee this is by calling
|
44 | 44 | * {@link #close()} in a finally block.
|
45 | 45 | *
|
46 |
| - * @see DatabaseClient#transactionManagerAsync() |
| 46 | + * @see DatabaseClient#transactionManagerAsync(TransactionOption...) |
47 | 47 | */
|
48 | 48 | public interface AsyncTransactionManager extends AutoCloseable {
|
49 | 49 | /**
|
@@ -91,10 +91,10 @@ Timestamp get(long timeout, TimeUnit unit)
|
91 | 91 |
|
92 | 92 | /**
|
93 | 93 | * {@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. |
98 | 98 | *
|
99 | 99 | * <p>Example usage:
|
100 | 100 | *
|
@@ -151,16 +151,16 @@ interface AsyncTransactionFunction<I, O> {
|
151 | 151 | * @param input the result of the previous transaction step.
|
152 | 152 | * @return an {@link ApiFuture} that will return the result of this step, and that will be the
|
153 | 153 | * 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). |
156 | 156 | */
|
157 | 157 | ApiFuture<O> apply(TransactionContext txn, I input) throws Exception;
|
158 | 158 | }
|
159 | 159 |
|
160 | 160 | /**
|
161 | 161 | * Creates a new read write transaction. This must be called before doing any other operation and
|
162 | 162 | * can only be called once. To create a new transaction for subsequent retries, see {@link
|
163 |
| - * #resetForRetry()}. |
| 163 | + * #resetForRetryAsync()}. |
164 | 164 | */
|
165 | 165 | TransactionContextFuture beginAsync();
|
166 | 166 |
|
|
0 commit comments