@@ -1597,50 +1597,46 @@ public Builder setDynamicChannelPoolEnabled(boolean enabled) {
15971597
15981598 // Granular DCP configuration setters with validation bounds
15991599 public Builder setDynamicPoolMaxRpc (int maxRpcPerChannel ) {
1600- Preconditions .checkArgument (maxRpcPerChannel >= 1 && maxRpcPerChannel <= 100 ,
1601- "maxRpcPerChannel must be in [1, 100]" );
1600+ Preconditions .checkArgument (
1601+ maxRpcPerChannel >= 1 && maxRpcPerChannel <= 100 , "maxRpcPerChannel must be in [1, 100]" );
16021602 this .dcpMaxRpcPerChannel = maxRpcPerChannel ;
16031603 return this ;
16041604 }
16051605
16061606 public Builder setDynamicPoolMinRpc (int minRpcPerChannel ) {
1607- Preconditions .checkArgument (minRpcPerChannel >= 1 ,
1608- "minRpcPerChannel must be >= 1" );
1607+ Preconditions .checkArgument (minRpcPerChannel >= 1 , "minRpcPerChannel must be >= 1" );
16091608 this .dcpMinRpcPerChannel = minRpcPerChannel ;
16101609 return this ;
16111610 }
16121611
16131612 public Builder setDynamicPoolScaleDownInterval (Duration interval ) {
16141613 Preconditions .checkNotNull (interval , "interval cannot be null" );
1615- Preconditions .checkArgument (!interval .isNegative () && !interval .isZero (),
1616- "interval must be > 0" );
16171614 Preconditions .checkArgument (
1618- interval .compareTo (Duration .ofSeconds (30 )) >= 0 ,
1619- "interval must be >= 30 seconds" );
1615+ !interval .isNegative () && !interval .isZero (), "interval must be > 0" );
1616+ Preconditions .checkArgument (
1617+ interval .compareTo (Duration .ofSeconds (30 )) >= 0 , "interval must be >= 30 seconds" );
16201618 Preconditions .checkArgument (
1621- interval .compareTo (Duration .ofMinutes (60 )) <= 0 ,
1622- "interval must be <= 60 minutes" );
1619+ interval .compareTo (Duration .ofMinutes (60 )) <= 0 , "interval must be <= 60 minutes" );
16231620 this .dcpScaleDownInterval = interval ;
16241621 return this ;
16251622 }
16261623
16271624 public Builder setDynamicPoolInitialSize (int initialSize ) {
1628- Preconditions .checkArgument (initialSize >= 1 && initialSize <= 256 ,
1629- "initialSize must be in [1, 256]" );
1625+ Preconditions .checkArgument (
1626+ initialSize >= 1 && initialSize <= 256 , "initialSize must be in [1, 256]" );
16301627 this .dcpInitialSize = initialSize ;
16311628 return this ;
16321629 }
16331630
16341631 public Builder setDynamicPoolMaxChannels (int maxChannels ) {
1635- Preconditions .checkArgument (maxChannels >= 1 && maxChannels <= 256 ,
1636- "maxChannels must be in [1, 256]" );
1632+ Preconditions .checkArgument (
1633+ maxChannels >= 1 && maxChannels <= 256 , "maxChannels must be in [1, 256]" );
16371634 this .dcpMaxChannels = maxChannels ;
16381635 return this ;
16391636 }
16401637
16411638 public Builder setDynamicPoolMinChannels (int minChannels ) {
1642- Preconditions .checkArgument (minChannels >= 1 ,
1643- "minChannels must be >= 1" );
1639+ Preconditions .checkArgument (minChannels >= 1 , "minChannels must be >= 1" );
16441640 this .dcpMinChannels = minChannels ;
16451641 return this ;
16461642 }
@@ -2061,12 +2057,29 @@ public boolean isDynamicChannelPoolEnabled() {
20612057 }
20622058
20632059 // Dynamic Channel Pool getters used by channel setup
2064- public Integer getDcpMaxRpcPerChannel () { return dcpMaxRpcPerChannel ; }
2065- public Integer getDcpMinRpcPerChannel () { return dcpMinRpcPerChannel ; }
2066- public Duration getDcpScaleDownInterval () { return dcpScaleDownInterval ; }
2067- public Integer getDcpInitialSize () { return dcpInitialSize ; }
2068- public Integer getDcpMaxChannels () { return dcpMaxChannels ; }
2069- public Integer getDcpMinChannels () { return dcpMinChannels ; }
2060+ public Integer getDcpMaxRpcPerChannel () {
2061+ return dcpMaxRpcPerChannel ;
2062+ }
2063+
2064+ public Integer getDcpMinRpcPerChannel () {
2065+ return dcpMinRpcPerChannel ;
2066+ }
2067+
2068+ public Duration getDcpScaleDownInterval () {
2069+ return dcpScaleDownInterval ;
2070+ }
2071+
2072+ public Integer getDcpInitialSize () {
2073+ return dcpInitialSize ;
2074+ }
2075+
2076+ public Integer getDcpMaxChannels () {
2077+ return dcpMaxChannels ;
2078+ }
2079+
2080+ public Integer getDcpMinChannels () {
2081+ return dcpMinChannels ;
2082+ }
20702083
20712084 public boolean isAutoThrottleAdministrativeRequests () {
20722085 return autoThrottleAdministrativeRequests ;
0 commit comments