|
15 | 15 | */ |
16 | 16 | package com.google.cloud.bigtable.admin.v2; |
17 | 17 |
|
18 | | -import com.google.api.core.ApiAsyncFunction; |
19 | 18 | import com.google.api.core.ApiFunction; |
20 | 19 | import com.google.api.core.ApiFuture; |
21 | 20 | import com.google.api.core.ApiFutures; |
@@ -160,15 +159,18 @@ private static AwaitConsistencyCallableV2 createAwaitConsistencyCallable( |
160 | 159 | throws IOException { |
161 | 160 |
|
162 | 161 | // Reusing getRestoreTableMethod() as a placeholder descriptor for LRO optimization tracking. |
163 | | - // Since there is no dedicated gRPC LRO method descriptor generated for OptimizeRestoredTable LRO, |
| 162 | + // Since there is no dedicated gRPC LRO method descriptor generated for OptimizeRestoredTable |
| 163 | + // LRO, |
164 | 164 | // we reuse getRestoreTableMethod() (which is an LRO and returns a google.longrunning.Operation) |
165 | | - // and attach a throwing Marshaller for Void to satisfy the OperationCallable constructor requirements. |
166 | | - // Note: We do not plumb the gRPC ManagedChannel into the ClientContext below because this callable |
167 | | - // is only used for resumeFutureCall() (polling existing LROs via OperationsStub), which already encapsulates |
| 165 | + // and attach a throwing Marshaller for Void to satisfy the OperationCallable constructor |
| 166 | + // requirements. |
| 167 | + // Note: We do not plumb the gRPC ManagedChannel into the ClientContext below because this |
| 168 | + // callable |
| 169 | + // is only used for resumeFutureCall() (polling existing LROs via OperationsStub), which already |
| 170 | + // encapsulates |
168 | 171 | // its own channel. The initial RPC is never called through this OperationCallable. |
169 | 172 | MethodDescriptor<Void, Operation> fakeDescriptor = |
170 | | - BigtableTableAdminGrpc.getRestoreTableMethod() |
171 | | - .toBuilder( |
| 173 | + BigtableTableAdminGrpc.getRestoreTableMethod().toBuilder( |
172 | 174 | new Marshaller<Void>() { |
173 | 175 | @Override |
174 | 176 | public InputStream stream(Void value) { |
@@ -297,8 +299,7 @@ public ApiFuture<Void> awaitOptimizeRestoredTableAsync( |
297 | 299 | OptimizeRestoredTableOperationToken token) { |
298 | 300 | ApiFuture<Empty> emptyFuture = |
299 | 301 | getOptimizeRestoredTableCallable().resumeFutureCall(token.getOperationName()); |
300 | | - return ApiFutures.transform( |
301 | | - emptyFuture, input -> null, MoreExecutors.directExecutor()); |
| 302 | + return ApiFutures.transform(emptyFuture, input -> null, MoreExecutors.directExecutor()); |
302 | 303 | } |
303 | 304 |
|
304 | 305 | /** |
|
0 commit comments