Skip to content

Commit 333e9e9

Browse files
committed
no-op channel primer changes
Change-Id: I9ad5eeaacb02ace9ba3cf7c09b6846dcbc298fb8
1 parent d2b6129 commit 333e9e9

3 files changed

Lines changed: 24 additions & 3 deletions

File tree

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/NoOpChannelPrimer.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
package com.google.cloud.bigtable.data.v2.stub;
1717

1818
import com.google.api.core.InternalApi;
19-
import com.google.api.gax.grpc.ChannelPrimer;
19+
import com.google.api.core.SettableApiFuture;
20+
import com.google.bigtable.v2.PingAndWarmResponse;
21+
import com.google.cloud.bigtable.gaxx.grpc.ChannelPrimer;
2022
import io.grpc.ManagedChannel;
2123

2224
@InternalApi
@@ -31,4 +33,9 @@ private NoOpChannelPrimer() {}
3133
public void primeChannel(ManagedChannel managedChannel) {
3234
// No op
3335
}
36+
37+
@Override
38+
public SettableApiFuture<PingAndWarmResponse> sendPrimeRequestsAsync(ManagedChannel var1) {
39+
return null;
40+
}
3441
}

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/ChannelPoolHealthChecker.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static ProbeResult create(Instant startTime, boolean success) {
6767
}
6868

6969
private final Supplier<ImmutableList<Entry>> entrySupplier;
70-
private Instant lastEviction;
70+
private volatile Instant lastEviction;
7171
private ScheduledExecutorService executor;
7272

7373
private ChannelPrimer channelPrimer;
@@ -112,7 +112,6 @@ public void stop() {
112112
/** Runs probes on all the channels in the pool. */
113113
@VisibleForTesting
114114
void runProbes() {
115-
// Method stub, no operation.
116115
for (Entry entry : this.entrySupplier.get()) {
117116
Instant startTime = clock.instant();
118117
SettableApiFuture<PingAndWarmResponse> probeFuture =

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/ChannelPrimer.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.google.cloud.bigtable.gaxx.grpc;
217

318
import com.google.api.core.InternalApi;

0 commit comments

Comments
 (0)