Skip to content

Commit f9792b6

Browse files
committed
style(gax-grpc): format ChannelPool.java
1 parent 899736f commit f9792b6

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

  • sdk-platform-java/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc

sdk-platform-java/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/ChannelPool.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,17 @@ class ChannelPool extends ManagedChannel {
8484
private final AtomicInteger indexTicker = new AtomicInteger();
8585
private final String authority;
8686

87-
// The number of consecutive resize cycles to wait before logging a warning about repeated resizing.
88-
// This is an arbitrary value chosen to detect repeated requests for changes (multiple continuous increase or decrease attempts) without being too sensitive.
87+
// The number of consecutive resize cycles to wait before logging a warning about repeated
88+
// resizing.
89+
// This is an arbitrary value chosen to detect repeated requests for changes (multiple continuous
90+
// increase or decrease attempts) without being too sensitive.
8991
private static final int CONSECUTIVE_RESIZE_THRESHOLD = 5;
9092

91-
// Tracks the number of consecutive resize cycles where a resize actually occurred (either expand or shrink).
93+
// Tracks the number of consecutive resize cycles where a resize actually occurred (either expand
94+
// or shrink).
9295
// Used to detect repeated resizing activity and log a warning.
93-
// Note: This field is only accessed within the synchronized resize() method, so it does not need to be atomic.
96+
// Note: This field is only accessed within the synchronized resize() method, so it does not need
97+
// to be atomic.
9498
private int consecutiveResizes = 0;
9599

96100
static ChannelPool create(
@@ -341,9 +345,11 @@ void resize() {
341345
if (consecutiveResizes == CONSECUTIVE_RESIZE_THRESHOLD) {
342346
StringBuilder sb = new StringBuilder();
343347
sb.append("Channel pool is repeatedly resizing. ");
344-
sb.append("Consider adjusting `initialChannelCount` or `maxResizeDelta` to a more reasonable value. ");
348+
sb.append(
349+
"Consider adjusting `initialChannelCount` or `maxResizeDelta` to a more reasonable value. ");
345350
sb.append("See https://docs.cloud.google.com/java/docs/troubleshooting to enable logging ");
346-
sb.append("and set `com.google.api.gax.grpc.ChannelPool.level=FINEST` to log the channel pool resize behavior.");
351+
sb.append(
352+
"and set `com.google.api.gax.grpc.ChannelPool.level=FINEST` to log the channel pool resize behavior.");
347353
LOG.warning(sb.toString());
348354
}
349355

0 commit comments

Comments
 (0)