Skip to content

Commit 91eeae3

Browse files
committed
chore(spanner): add overriden method for readwrite txn in multiplexed session
1 parent 76f4d31 commit 91eeae3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import com.google.api.core.ApiFuture;
2222
import com.google.api.core.ApiFutures;
2323
import com.google.api.core.SettableApiFuture;
24+
import com.google.cloud.spanner.Options.TransactionOption;
2425
import com.google.cloud.spanner.SessionClient.SessionConsumer;
2526
import com.google.cloud.spanner.SpannerException.ResourceNotFoundException;
2627
import com.google.common.annotations.VisibleForTesting;
@@ -388,6 +389,11 @@ public ReadOnlyTransaction readOnlyTransaction(TimestampBound bound) {
388389
return createMultiplexedSessionTransaction(false).readOnlyTransaction(bound);
389390
}
390391

392+
@Override
393+
public TransactionRunner readWriteTransaction(TransactionOption... options) {
394+
return createMultiplexedSessionTransaction(false).readWriteTransaction(options);
395+
}
396+
391397
/**
392398
* It is enough with one executor to maintain the multiplexed sessions in all the clients, as they
393399
* do not need to be updated often, and the maintenance task is light. The core pool size is set

0 commit comments

Comments
 (0)