@@ -63,7 +63,7 @@ public abstract class HystrixThreadPoolProperties {
63
63
private final HystrixProperty <Integer > keepAliveTime ;
64
64
private final HystrixProperty <Integer > maxQueueSize ;
65
65
private final HystrixProperty <Integer > queueSizeRejectionThreshold ;
66
- private final boolean allowMaximumSizeToDivergeFromCoreSize ;
66
+ private final HystrixProperty < Boolean > allowMaximumSizeToDivergeFromCoreSize ;
67
67
68
68
private final HystrixProperty <Integer > threadPoolRollingNumberStatisticalWindowInMilliseconds ;
69
69
private final HystrixProperty <Integer > threadPoolRollingNumberStatisticalWindowBuckets ;
@@ -77,7 +77,7 @@ protected HystrixThreadPoolProperties(HystrixThreadPoolKey key, Setter builder)
77
77
}
78
78
79
79
protected HystrixThreadPoolProperties (HystrixThreadPoolKey key , Setter builder , String propertyPrefix ) {
80
- this .allowMaximumSizeToDivergeFromCoreSize = getValueOnce (propertyPrefix , key , "allowMaximumSizeToDivergeFromCoreSize" ,
80
+ this .allowMaximumSizeToDivergeFromCoreSize = getProperty (propertyPrefix , key , "allowMaximumSizeToDivergeFromCoreSize" ,
81
81
builder .getAllowMaximumSizeToDivergeFromCoreSize (), default_allow_maximum_size_to_diverge_from_core_size );
82
82
83
83
this .corePoolSize = getProperty (propertyPrefix , key , "coreSize" , builder .getCoreSize (), default_coreSize );
@@ -99,12 +99,11 @@ private static HystrixProperty<Integer> getProperty(String propertyPrefix, Hystr
99
99
.build ();
100
100
}
101
101
102
- private static boolean getValueOnce (String propertyPrefix , HystrixThreadPoolKey key , String instanceProperty , boolean builderOverrideValue , boolean defaultValue ) {
102
+ private static HystrixProperty < Boolean > getProperty (String propertyPrefix , HystrixThreadPoolKey key , String instanceProperty , Boolean builderOverrideValue , Boolean defaultValue ) {
103
103
return forBoolean ()
104
104
.add (propertyPrefix + ".threadpool." + key .name () + "." + instanceProperty , builderOverrideValue )
105
105
.add (propertyPrefix + ".threadpool.default." + instanceProperty , defaultValue )
106
- .build ()
107
- .get ();
106
+ .build ();
108
107
}
109
108
110
109
/**
@@ -158,7 +157,7 @@ public HystrixProperty<Integer> queueSizeRejectionThreshold() {
158
157
return queueSizeRejectionThreshold ;
159
158
}
160
159
161
- public boolean getAllowMaximumSizeToDivergeFromCoreSize () {
160
+ public HystrixProperty < Boolean > getAllowMaximumSizeToDivergeFromCoreSize () {
162
161
return allowMaximumSizeToDivergeFromCoreSize ;
163
162
}
164
163
@@ -218,7 +217,7 @@ public static class Setter {
218
217
private Integer keepAliveTimeMinutes = null ;
219
218
private Integer maxQueueSize = null ;
220
219
private Integer queueSizeRejectionThreshold = null ;
221
- private boolean allowMaximumSizeToDivergeFromCoreSize = false ;
220
+ private Boolean allowMaximumSizeToDivergeFromCoreSize = null ;
222
221
private Integer rollingStatisticalWindowInMilliseconds = null ;
223
222
private Integer rollingStatisticalWindowBuckets = null ;
224
223
@@ -245,7 +244,7 @@ public Integer getQueueSizeRejectionThreshold() {
245
244
return queueSizeRejectionThreshold ;
246
245
}
247
246
248
- public boolean getAllowMaximumSizeToDivergeFromCoreSize () {
247
+ public Boolean getAllowMaximumSizeToDivergeFromCoreSize () {
249
248
return allowMaximumSizeToDivergeFromCoreSize ;
250
249
}
251
250
0 commit comments