File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
src/main/java/com/google/cloud/spanner/spi/v1 Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change 162162 <dependency >
163163 <groupId >com.google.cloud</groupId >
164164 <artifactId >grpc-gcp</artifactId >
165+ <version >1.6.2-SNAPSHOT</version >
165166 </dependency >
166167 <dependency >
167168 <groupId >io.grpc</groupId >
Original file line number Diff line number Diff line change 6060import com .google .cloud .grpc .GcpManagedChannel ;
6161import com .google .cloud .grpc .GcpManagedChannelBuilder ;
6262import com .google .cloud .grpc .GcpManagedChannelOptions ;
63+ import com .google .cloud .grpc .GcpManagedChannelOptions .GcpChannelPoolOptions ;
6364import com .google .cloud .grpc .GcpManagedChannelOptions .GcpMetricsOptions ;
6465import com .google .cloud .grpc .GrpcTransportOptions ;
6566import com .google .cloud .spanner .AdminRequestsPerMinuteExceededException ;
@@ -589,8 +590,11 @@ private static GcpManagedChannelOptions grpcGcpOptionsWithMetrics(SpannerOptions
589590 if (metricsOptions .getNamePrefix ().equals ("" )) {
590591 metricsOptionsBuilder .withNamePrefix ("cloud.google.com/java/spanner/gcp-channel-pool/" );
591592 }
593+ GcpChannelPoolOptions .Builder channelPoolOptionsBuilder =
594+ GcpChannelPoolOptions .newBuilder ().setDynamicScaling (0 , 100 , Duration .ofMinutes (30L ));
592595 return GcpManagedChannelOptions .newBuilder (grpcGcpOptions )
593596 .withMetricsOptions (metricsOptionsBuilder .build ())
597+ .withChannelPoolOptions (channelPoolOptionsBuilder .build ())
594598 .build ();
595599 }
596600
You can’t perform that action at this time.
0 commit comments