@@ -58,7 +58,7 @@ public ReadContext singleUse() {
5858 this .sessionFuture ,
5959 sessionReference ->
6060 new MultiplexedSessionTransaction (
61- client , span , sessionReference , NO_CHANNEL_HINT , true )
61+ client , span , sessionReference , NO_CHANNEL_HINT , /* singleUse = */ true )
6262 .singleUse (),
6363 MoreExecutors .directExecutor ()));
6464 }
@@ -70,7 +70,7 @@ public ReadContext singleUse(TimestampBound bound) {
7070 this .sessionFuture ,
7171 sessionReference ->
7272 new MultiplexedSessionTransaction (
73- client , span , sessionReference , NO_CHANNEL_HINT , true )
73+ client , span , sessionReference , NO_CHANNEL_HINT , /* singleUse = */ true )
7474 .singleUse (bound ),
7575 MoreExecutors .directExecutor ()));
7676 }
@@ -82,7 +82,7 @@ public ReadOnlyTransaction singleUseReadOnlyTransaction() {
8282 this .sessionFuture ,
8383 sessionReference ->
8484 new MultiplexedSessionTransaction (
85- client , span , sessionReference , NO_CHANNEL_HINT , true )
85+ client , span , sessionReference , NO_CHANNEL_HINT , /* singleUse = */ true )
8686 .singleUseReadOnlyTransaction (),
8787 MoreExecutors .directExecutor ()));
8888 }
@@ -94,7 +94,7 @@ public ReadOnlyTransaction singleUseReadOnlyTransaction(TimestampBound bound) {
9494 this .sessionFuture ,
9595 sessionReference ->
9696 new MultiplexedSessionTransaction (
97- client , span , sessionReference , NO_CHANNEL_HINT , true )
97+ client , span , sessionReference , NO_CHANNEL_HINT , /* singleUse = */ true )
9898 .singleUseReadOnlyTransaction (bound ),
9999 MoreExecutors .directExecutor ()));
100100 }
@@ -106,7 +106,7 @@ public ReadOnlyTransaction readOnlyTransaction() {
106106 this .sessionFuture ,
107107 sessionReference ->
108108 new MultiplexedSessionTransaction (
109- client , span , sessionReference , NO_CHANNEL_HINT , false )
109+ client , span , sessionReference , NO_CHANNEL_HINT , /* singleUse = */ false )
110110 .readOnlyTransaction (),
111111 MoreExecutors .directExecutor ()));
112112 }
@@ -118,7 +118,7 @@ public ReadOnlyTransaction readOnlyTransaction(TimestampBound bound) {
118118 this .sessionFuture ,
119119 sessionReference ->
120120 new MultiplexedSessionTransaction (
121- client , span , sessionReference , NO_CHANNEL_HINT , false )
121+ client , span , sessionReference , NO_CHANNEL_HINT , /* singleUse = */ false )
122122 .readOnlyTransaction (bound ),
123123 MoreExecutors .directExecutor ()));
124124 }
@@ -132,34 +132,33 @@ public CommitResponse writeAtLeastOnceWithOptions(
132132 Iterable <Mutation > mutations , TransactionOption ... options ) throws SpannerException {
133133 SessionReference sessionReference = getSessionReference ();
134134 try (MultiplexedSessionTransaction transaction =
135- new MultiplexedSessionTransaction (client , span , sessionReference , NO_CHANNEL_HINT , true )) {
135+ new MultiplexedSessionTransaction (
136+ client , span , sessionReference , NO_CHANNEL_HINT , /* singleUse = */ true )) {
136137 return transaction .writeAtLeastOnceWithOptions (mutations , options );
137138 }
138139 }
139140
140- /**
141- * This is a blocking method, as the interface that it implements is also defined as a blocking
142- * method.
143- */
141+ // This is a blocking method, as the interface that it implements is also defined as a blocking
142+ // method.
144143 @ Override
145144 public Timestamp write (Iterable <Mutation > mutations ) throws SpannerException {
146145 SessionReference sessionReference = getSessionReference ();
147146 try (MultiplexedSessionTransaction transaction =
148- new MultiplexedSessionTransaction (client , span , sessionReference , NO_CHANNEL_HINT , false )) {
147+ new MultiplexedSessionTransaction (
148+ client , span , sessionReference , NO_CHANNEL_HINT , /* singleUse = */ false )) {
149149 return transaction .write (mutations );
150150 }
151151 }
152152
153- /**
154- * This is a blocking method, as the interface that it implements is also defined as a blocking
155- * method.
156- */
153+ // This is a blocking method, as the interface that it implements is also defined as a blocking
154+ // method.
157155 @ Override
158156 public CommitResponse writeWithOptions (Iterable <Mutation > mutations , TransactionOption ... options )
159157 throws SpannerException {
160158 SessionReference sessionReference = getSessionReference ();
161159 try (MultiplexedSessionTransaction transaction =
162- new MultiplexedSessionTransaction (client , span , sessionReference , NO_CHANNEL_HINT , false )) {
160+ new MultiplexedSessionTransaction (
161+ client , span , sessionReference , NO_CHANNEL_HINT , /* singleUse = */ false )) {
163162 return transaction .writeWithOptions (mutations , options );
164163 }
165164 }
@@ -171,7 +170,7 @@ public TransactionRunner readWriteTransaction(TransactionOption... options) {
171170 this .sessionFuture ,
172171 sessionReference ->
173172 new MultiplexedSessionTransaction (
174- client , span , sessionReference , NO_CHANNEL_HINT , false )
173+ client , span , sessionReference , NO_CHANNEL_HINT , /* singleUse = */ false )
175174 .readWriteTransaction (options ),
176175 MoreExecutors .directExecutor ()));
177176 }
@@ -183,7 +182,7 @@ public TransactionManager transactionManager(TransactionOption... options) {
183182 this .sessionFuture ,
184183 sessionReference ->
185184 new MultiplexedSessionTransaction (
186- client , span , sessionReference , NO_CHANNEL_HINT , false )
185+ client , span , sessionReference , NO_CHANNEL_HINT , /* singleUse = */ false )
187186 .transactionManager (options ),
188187 MoreExecutors .directExecutor ()));
189188 }
@@ -195,7 +194,7 @@ public AsyncRunner runAsync(TransactionOption... options) {
195194 this .sessionFuture ,
196195 sessionReference ->
197196 new MultiplexedSessionTransaction (
198- client , span , sessionReference , NO_CHANNEL_HINT , false )
197+ client , span , sessionReference , NO_CHANNEL_HINT , /* singleUse = */ false )
199198 .runAsync (options ),
200199 MoreExecutors .directExecutor ()));
201200 }
@@ -207,7 +206,7 @@ public AsyncTransactionManager transactionManagerAsync(TransactionOption... opti
207206 this .sessionFuture ,
208207 sessionReference ->
209208 new MultiplexedSessionTransaction (
210- client , span , sessionReference , NO_CHANNEL_HINT , false )
209+ client , span , sessionReference , NO_CHANNEL_HINT , /* singleUse = */ false )
211210 .transactionManagerAsync (options ),
212211 MoreExecutors .directExecutor ()));
213212 }
0 commit comments