Repository: camel
Updated Branches:
  refs/heads/master 1375e5c5b -> 592104d65


Regenerate doc for hystrixConfiguration-eip


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/592104d6
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/592104d6
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/592104d6

Branch: refs/heads/master
Commit: 592104d65e8d4aea43930797714d019beba0e334
Parents: 1375e5c
Author: lburgazzoli <lburgazz...@gmail.com>
Authored: Wed Mar 15 09:56:03 2017 +0100
Committer: lburgazzoli <lburgazz...@gmail.com>
Committed: Wed Mar 15 09:56:14 2017 +0100

----------------------------------------------------------------------
 .../docs/eips/hystrixConfiguration-eip.adoc     |  62 ++++----
 .../camel/model/HystrixConfigurationCommon.java | 145 ++++++++++++++++++-
 2 files changed, 175 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/592104d6/camel-core/src/main/docs/eips/hystrixConfiguration-eip.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/eips/hystrixConfiguration-eip.adoc 
b/camel-core/src/main/docs/eips/hystrixConfiguration-eip.adoc
index 69df9c6..ca061db 100644
--- a/camel-core/src/main/docs/eips/hystrixConfiguration-eip.adoc
+++ b/camel-core/src/main/docs/eips/hystrixConfiguration-eip.adoc
@@ -8,36 +8,36 @@ The Hystrix Configuration EIP supports 31 options which are 
listed below:
 [width="100%",cols="3,1m,6",options="header"]
 |=======================================================================
 | Name | Java Type | Description
-| groupKey | String | 
-| threadPoolKey | String | 
-| circuitBreakerEnabled | Boolean | 
-| circuitBreakerErrorThresholdPercentage | Integer | 
-| circuitBreakerForceClosed | Boolean | 
-| circuitBreakerForceOpen | Boolean | 
-| circuitBreakerRequestVolumeThreshold | Integer | 
-| circuitBreakerSleepWindowInMilliseconds | Integer | 
-| executionIsolationSemaphoreMaxConcurrentRequests | Integer | 
-| executionIsolationStrategy | String | 
-| executionIsolationThreadInterruptOnTimeout | Boolean | 
-| executionTimeoutInMilliseconds | Integer | 
-| executionTimeoutEnabled | Boolean | 
-| fallbackIsolationSemaphoreMaxConcurrentRequests | Integer | 
-| fallbackEnabled | Boolean | 
-| metricsHealthSnapshotIntervalInMilliseconds | Integer | 
-| metricsRollingPercentileBucketSize | Integer | 
-| metricsRollingPercentileEnabled | Boolean | 
-| metricsRollingPercentileWindowInMilliseconds | Integer | 
-| metricsRollingPercentileWindowBuckets | Integer | 
-| metricsRollingStatisticalWindowInMilliseconds | Integer | 
-| metricsRollingStatisticalWindowBuckets | Integer | 
-| requestLogEnabled | Boolean | 
-| corePoolSize | Integer | 
-| maximumSize | Integer | 
-| keepAliveTime | Integer | 
-| maxQueueSize | Integer | 
-| queueSizeRejectionThreshold | Integer | 
-| threadPoolRollingNumberStatisticalWindowInMilliseconds | Integer | 
-| threadPoolRollingNumberStatisticalWindowBuckets | Integer | 
-| allowMaximumSizeToDivergeFromCoreSize | Boolean | 
+| groupKey | String | Sets the group key to use. The default value is 
CamelHystrix.
+| threadPoolKey | String | Sets the thread pool key to use. Will by default 
use the same value as groupKey has been configured to use.
+| circuitBreakerEnabled | Boolean | Whether to use a HystrixCircuitBreaker or 
not. If false no circuit-breaker logic will be used and all requests permitted. 
This is similar in effect to circuitBreakerForceClosed() except that continues 
tracking metrics and knowing whether it should be open/closed this property 
results in not even instantiating a circuit-breaker.
+| circuitBreakerErrorThresholdPercentage | Integer | Error percentage 
threshold (as whole number such as 50) at which point the circuit breaker will 
trip open and reject requests. It will stay tripped for the duration defined in 
circuitBreakerSleepWindowInMilliseconds; The error percentage this is compared 
against comes from HystrixCommandMetrics.getHealthCounts().
+| circuitBreakerForceClosed | Boolean | If true the 
HystrixCircuitBreakerallowRequest() will always return true to allow requests 
regardless of the error percentage from 
HystrixCommandMetrics.getHealthCounts(). The circuitBreakerForceOpen() property 
takes precedence so if it set to true this property does nothing.
+| circuitBreakerForceOpen | Boolean | If true the 
HystrixCircuitBreaker.allowRequest() will always return false causing the 
circuit to be open (tripped) and reject all requests. This property takes 
precedence over circuitBreakerForceClosed();
+| circuitBreakerRequestVolumeThreshold | Integer | Minimum number of requests 
in the metricsRollingStatisticalWindowInMilliseconds() that must exist before 
the HystrixCircuitBreaker will trip. If below this number the circuit will not 
trip regardless of error percentage.
+| circuitBreakerSleepWindowInMilliseconds | Integer | The time in milliseconds 
after a HystrixCircuitBreaker trips open that it should wait before trying 
requests again.
+| executionIsolationSemaphoreMaxConcurrentRequests | Integer | Number of 
concurrent requests permitted to HystrixCommand.run(). Requests beyond the 
concurrent limit will be rejected. Applicable only when 
executionIsolationStrategy == SEMAPHORE.
+| executionIsolationStrategy | String | What isolation strategy 
HystrixCommand.run() will be executed with. If THREAD then it will be executed 
on a separate thread and concurrent requests limited by the number of threads 
in the thread-pool. If SEMAPHORE then it will be executed on the calling thread 
and concurrent requests limited by the semaphore count.
+| executionIsolationThreadInterruptOnTimeout | Boolean | Whether the execution 
thread should attempt an interrupt (using link Futurecancel) when a thread 
times out. Applicable only when executionIsolationStrategy() == THREAD.
+| executionTimeoutInMilliseconds | Integer | Time in milliseconds at which 
point the command will timeout and halt execution. If link 
executionIsolationThreadInterruptOnTimeout == true and the command is 
thread-isolated the executing thread will be interrupted. If the command is 
semaphore-isolated and a HystrixObservableCommand that command will get 
unsubscribed.
+| executionTimeoutEnabled | Boolean | Whether the timeout mechanism is enabled 
for this command
+| fallbackIsolationSemaphoreMaxConcurrentRequests | Integer | Number of 
concurrent requests permitted to HystrixCommand.getFallback(). Requests beyond 
the concurrent limit will fail-fast and not attempt retrieving a fallback.
+| fallbackEnabled | Boolean | Whether HystrixCommand.getFallback() should be 
attempted when failure occurs.
+| metricsHealthSnapshotIntervalInMilliseconds | Integer | Time in milliseconds 
to wait between allowing health snapshots to be taken that calculate success 
and error percentages and affect HystrixCircuitBreaker.isOpen() status. On 
high-volume circuits the continual calculation of error percentage can become 
CPU intensive thus this controls how often it is calculated.
+| metricsRollingPercentileBucketSize | Integer | Maximum number of values 
stored in each bucket of the rolling percentile. This is passed into 
HystrixRollingPercentile inside HystrixCommandMetrics.
+| metricsRollingPercentileEnabled | Boolean | Whether percentile metrics 
should be captured using HystrixRollingPercentile inside HystrixCommandMetrics.
+| metricsRollingPercentileWindowInMilliseconds | Integer | Duration of 
percentile rolling window in milliseconds. This is passed into 
HystrixRollingPercentile inside HystrixCommandMetrics.
+| metricsRollingPercentileWindowBuckets | Integer | Number of buckets the 
rolling percentile window is broken into. This is passed into 
HystrixRollingPercentile inside HystrixCommandMetrics.
+| metricsRollingStatisticalWindowInMilliseconds | Integer | This property sets 
the duration of the statistical rolling window in milliseconds. This is how 
long metrics are kept for the thread pool. The window is divided into buckets 
and rolls by those increments.
+| metricsRollingStatisticalWindowBuckets | Integer | Number of buckets the 
rolling statistical window is broken into. This is passed into 
HystrixRollingNumber inside HystrixCommandMetrics.
+| requestLogEnabled | Boolean | Whether HystrixCommand execution and events 
should be logged to HystrixRequestLog.
+| corePoolSize | Integer | Core thread-pool size that gets passed to link 
java.util.concurrent.ThreadPoolExecutorsetCorePoolSize(int)
+| maximumSize | Integer | Maximum thread-pool size that gets passed to link 
ThreadPoolExecutorsetMaximumPoolSize(int). This is the maximum amount of 
concurrency that can be supported without starting to reject HystrixCommands. 
Please note that this setting only takes effect if you also set 
allowMaximumSizeToDivergeFromCoreSize
+| keepAliveTime | Integer | Keep-alive time in minutes that gets passed to 
link ThreadPoolExecutorsetKeepAliveTime(long TimeUnit)
+| maxQueueSize | Integer | Max queue size that gets passed to BlockingQueue in 
HystrixConcurrencyStrategy.getBlockingQueue(int) This should only affect the 
instantiation of a threadpool - it is not eliglible to change a queue size on 
the fly. For that use queueSizeRejectionThreshold().
+| queueSizeRejectionThreshold | Integer | Queue size rejection threshold is an 
artificial max size at which rejections will occur even if link maxQueueSize 
has not been reached. This is done because the link maxQueueSize of a 
BlockingQueue can not be dynamically changed and we want to support dynamically 
changing the queue size that affects rejections. This is used by HystrixCommand 
when queuing a thread for execution.
+| threadPoolRollingNumberStatisticalWindowInMilliseconds | Integer | Duration 
of statistical rolling window in milliseconds. This is passed into 
HystrixRollingNumber inside each HystrixThreadPoolMetrics instance.
+| threadPoolRollingNumberStatisticalWindowBuckets | Integer | Number of 
buckets the rolling statistical window is broken into. This is passed into 
HystrixRollingNumber inside each HystrixThreadPoolMetrics instance.
+| allowMaximumSizeToDivergeFromCoreSize | Boolean | Allows the configuration 
for maximumSize to take effect. That value can then be equal to or higher than 
coreSize
 |=======================================================================
 // eip options: END

http://git-wip-us.apache.org/repos/asf/camel/blob/592104d6/camel-core/src/main/java/org/apache/camel/model/HystrixConfigurationCommon.java
----------------------------------------------------------------------
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/HystrixConfigurationCommon.java
 
b/camel-core/src/main/java/org/apache/camel/model/HystrixConfigurationCommon.java
index fa91fff..ec5bac0 100644
--- 
a/camel-core/src/main/java/org/apache/camel/model/HystrixConfigurationCommon.java
+++ 
b/camel-core/src/main/java/org/apache/camel/model/HystrixConfigurationCommon.java
@@ -16,6 +16,10 @@
  */
 package org.apache.camel.model;
 
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.Future;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlAttribute;
@@ -128,6 +132,9 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return groupKey;
     }
 
+    /**
+     * Sets the group key to use. The default value is CamelHystrix.
+     */
     public void setGroupKey(String groupKey) {
         this.groupKey = groupKey;
     }
@@ -136,6 +143,9 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return threadPoolKey;
     }
 
+    /**
+     * Sets the thread pool key to use. Will by default use the same value as 
groupKey has been configured to use.
+     */
     public void setThreadPoolKey(String threadPoolKey) {
         this.threadPoolKey = threadPoolKey;
     }
@@ -144,6 +154,12 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return circuitBreakerEnabled;
     }
 
+    /**
+     * Whether to use a HystrixCircuitBreaker or not. If false no 
circuit-breaker logic will be used and all requests permitted.
+     * <p>
+     * This is similar in effect to circuitBreakerForceClosed() except that 
continues tracking metrics and knowing whether it
+     * should be open/closed, this property results in not even instantiating 
a circuit-breaker.
+     */
     public void setCircuitBreakerEnabled(Boolean circuitBreakerEnabled) {
         this.circuitBreakerEnabled = circuitBreakerEnabled;
     }
@@ -152,6 +168,13 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return circuitBreakerErrorThresholdPercentage;
     }
 
+    /**
+     * Error percentage threshold (as whole number such as 50) at which point 
the circuit breaker will trip open and reject requests.
+     * <p>
+     * It will stay tripped for the duration defined in 
circuitBreakerSleepWindowInMilliseconds;
+     * <p>
+     * The error percentage this is compared against comes from 
HystrixCommandMetrics.getHealthCounts().
+     */
     public void setCircuitBreakerErrorThresholdPercentage(Integer 
circuitBreakerErrorThresholdPercentage) {
         this.circuitBreakerErrorThresholdPercentage = 
circuitBreakerErrorThresholdPercentage;
     }
@@ -160,6 +183,12 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return circuitBreakerForceClosed;
     }
 
+    /**
+     * If true the HystrixCircuitBreaker#allowRequest() will always return 
true to allow requests regardless of
+     * the error percentage from HystrixCommandMetrics.getHealthCounts().
+     * <p>
+     * The circuitBreakerForceOpen() property takes precedence so if it set to 
true this property does nothing.
+     */
     public void setCircuitBreakerForceClosed(Boolean 
circuitBreakerForceClosed) {
         this.circuitBreakerForceClosed = circuitBreakerForceClosed;
     }
@@ -168,6 +197,11 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return circuitBreakerForceOpen;
     }
 
+    /**
+     * If true the HystrixCircuitBreaker.allowRequest() will always return 
false, causing the circuit to be open (tripped) and reject all requests.
+     * <p>
+     * This property takes precedence over circuitBreakerForceClosed();
+     */
     public void setCircuitBreakerForceOpen(Boolean circuitBreakerForceOpen) {
         this.circuitBreakerForceOpen = circuitBreakerForceOpen;
     }
@@ -176,6 +210,11 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return circuitBreakerRequestVolumeThreshold;
     }
 
+    /**
+     * Minimum number of requests in the 
metricsRollingStatisticalWindowInMilliseconds() that must exist before the 
HystrixCircuitBreaker will trip.
+     * <p>
+     * If below this number the circuit will not trip regardless of error 
percentage.
+     */
     public void setCircuitBreakerRequestVolumeThreshold(Integer 
circuitBreakerRequestVolumeThreshold) {
         this.circuitBreakerRequestVolumeThreshold = 
circuitBreakerRequestVolumeThreshold;
     }
@@ -184,6 +223,9 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return circuitBreakerSleepWindowInMilliseconds;
     }
 
+    /**
+     * The time in milliseconds after a HystrixCircuitBreaker trips open that 
it should wait before trying requests again.
+     */
     public void setCircuitBreakerSleepWindowInMilliseconds(Integer 
circuitBreakerSleepWindowInMilliseconds) {
         this.circuitBreakerSleepWindowInMilliseconds = 
circuitBreakerSleepWindowInMilliseconds;
     }
@@ -192,6 +234,11 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return executionIsolationSemaphoreMaxConcurrentRequests;
     }
 
+    /**
+     * Number of concurrent requests permitted to HystrixCommand.run(). 
Requests beyond the concurrent limit will be rejected.
+     * <p>
+     * Applicable only when executionIsolationStrategy == SEMAPHORE.
+     */
     public void setExecutionIsolationSemaphoreMaxConcurrentRequests(Integer 
executionIsolationSemaphoreMaxConcurrentRequests) {
         this.executionIsolationSemaphoreMaxConcurrentRequests = 
executionIsolationSemaphoreMaxConcurrentRequests;
     }
@@ -200,6 +247,13 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return executionIsolationStrategy;
     }
 
+    /**
+     * What isolation strategy HystrixCommand.run() will be executed with.
+     * <p>
+     * If THREAD then it will be executed on a separate thread and concurrent 
requests limited by the number of threads in the thread-pool.
+     * <p>
+     * If SEMAPHORE then it will be executed on the calling thread and 
concurrent requests limited by the semaphore count.
+     */
     public void setExecutionIsolationStrategy(String 
executionIsolationStrategy) {
         this.executionIsolationStrategy = executionIsolationStrategy;
     }
@@ -208,6 +262,11 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return executionIsolationThreadInterruptOnTimeout;
     }
 
+    /**
+     * Whether the execution thread should attempt an interrupt (using {@link 
Future#cancel}) when a thread times out.
+     * <p>
+     * Applicable only when executionIsolationStrategy() == THREAD.
+     */
     public void setExecutionIsolationThreadInterruptOnTimeout(Boolean 
executionIsolationThreadInterruptOnTimeout) {
         this.executionIsolationThreadInterruptOnTimeout = 
executionIsolationThreadInterruptOnTimeout;
     }
@@ -216,6 +275,12 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return executionTimeoutInMilliseconds;
     }
 
+    /**
+     * Time in milliseconds at which point the command will timeout and halt 
execution.
+     * <p>
+     * If {@link #executionIsolationThreadInterruptOnTimeout} == true and the 
command is thread-isolated, the executing thread will be interrupted.
+     * If the command is semaphore-isolated and a HystrixObservableCommand, 
that command will get unsubscribed.
+     */
     public void setExecutionTimeoutInMilliseconds(Integer 
executionTimeoutInMilliseconds) {
         this.executionTimeoutInMilliseconds = executionTimeoutInMilliseconds;
     }
@@ -223,7 +288,9 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
     public Boolean getExecutionTimeoutEnabled() {
         return executionTimeoutEnabled;
     }
-
+    /**
+     * Whether the timeout mechanism is enabled for this command
+     */
     public void setExecutionTimeoutEnabled(Boolean executionTimeoutEnabled) {
         this.executionTimeoutEnabled = executionTimeoutEnabled;
     }
@@ -232,6 +299,10 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return fallbackIsolationSemaphoreMaxConcurrentRequests;
     }
 
+    /**
+     * Number of concurrent requests permitted to HystrixCommand.getFallback().
+     * Requests beyond the concurrent limit will fail-fast and not attempt 
retrieving a fallback.
+     */
     public void setFallbackIsolationSemaphoreMaxConcurrentRequests(Integer 
fallbackIsolationSemaphoreMaxConcurrentRequests) {
         this.fallbackIsolationSemaphoreMaxConcurrentRequests = 
fallbackIsolationSemaphoreMaxConcurrentRequests;
     }
@@ -240,6 +311,9 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return fallbackEnabled;
     }
 
+    /**
+     * Whether HystrixCommand.getFallback() should be attempted when failure 
occurs.
+     */
     public void setFallbackEnabled(Boolean fallbackEnabled) {
         this.fallbackEnabled = fallbackEnabled;
     }
@@ -248,6 +322,12 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return metricsHealthSnapshotIntervalInMilliseconds;
     }
 
+    /**
+     * Time in milliseconds to wait between allowing health snapshots to be 
taken that calculate success and error
+     * percentages and affect HystrixCircuitBreaker.isOpen() status.
+     * <p>
+     * On high-volume circuits the continual calculation of error percentage 
can become CPU intensive thus this controls how often it is calculated.
+     */
     public void setMetricsHealthSnapshotIntervalInMilliseconds(Integer 
metricsHealthSnapshotIntervalInMilliseconds) {
         this.metricsHealthSnapshotIntervalInMilliseconds = 
metricsHealthSnapshotIntervalInMilliseconds;
     }
@@ -256,6 +336,10 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return metricsRollingPercentileBucketSize;
     }
 
+    /**
+     * Maximum number of values stored in each bucket of the rolling 
percentile.
+     * This is passed into HystrixRollingPercentile inside 
HystrixCommandMetrics.
+     */
     public void setMetricsRollingPercentileBucketSize(Integer 
metricsRollingPercentileBucketSize) {
         this.metricsRollingPercentileBucketSize = 
metricsRollingPercentileBucketSize;
     }
@@ -264,6 +348,9 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return metricsRollingPercentileEnabled;
     }
 
+    /**
+     * Whether percentile metrics should be captured using 
HystrixRollingPercentile inside HystrixCommandMetrics.
+     */
     public void setMetricsRollingPercentileEnabled(Boolean 
metricsRollingPercentileEnabled) {
         this.metricsRollingPercentileEnabled = metricsRollingPercentileEnabled;
     }
@@ -272,6 +359,10 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return metricsRollingPercentileWindowInMilliseconds;
     }
 
+    /**
+     * Duration of percentile rolling window in milliseconds.
+     * This is passed into HystrixRollingPercentile inside 
HystrixCommandMetrics.
+     */
     public void setMetricsRollingPercentileWindowInMilliseconds(Integer 
metricsRollingPercentileWindowInMilliseconds) {
         this.metricsRollingPercentileWindowInMilliseconds = 
metricsRollingPercentileWindowInMilliseconds;
     }
@@ -280,6 +371,10 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return metricsRollingPercentileWindowBuckets;
     }
 
+    /**
+     * Number of buckets the rolling percentile window is broken into.
+     * This is passed into HystrixRollingPercentile inside 
HystrixCommandMetrics.
+     */
     public void setMetricsRollingPercentileWindowBuckets(Integer 
metricsRollingPercentileWindowBuckets) {
         this.metricsRollingPercentileWindowBuckets = 
metricsRollingPercentileWindowBuckets;
     }
@@ -288,6 +383,11 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return metricsRollingStatisticalWindowInMilliseconds;
     }
 
+    /**
+     * This property sets the duration of the statistical rolling window, in 
milliseconds. This is how long metrics are kept for the thread pool.
+     *
+     * The window is divided into buckets and “rolls” by those increments.
+     */
     public void setMetricsRollingStatisticalWindowInMilliseconds(Integer 
metricsRollingStatisticalWindowInMilliseconds) {
         this.metricsRollingStatisticalWindowInMilliseconds = 
metricsRollingStatisticalWindowInMilliseconds;
     }
@@ -296,6 +396,10 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return metricsRollingStatisticalWindowBuckets;
     }
 
+    /**
+     * Number of buckets the rolling statistical window is broken into.
+     * This is passed into HystrixRollingNumber inside HystrixCommandMetrics.
+     */
     public void setMetricsRollingStatisticalWindowBuckets(Integer 
metricsRollingStatisticalWindowBuckets) {
         this.metricsRollingStatisticalWindowBuckets = 
metricsRollingStatisticalWindowBuckets;
     }
@@ -304,6 +408,9 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return requestLogEnabled;
     }
 
+    /**
+     * Whether HystrixCommand execution and events should be logged to 
HystrixRequestLog.
+     */
     public void setRequestLogEnabled(Boolean requestLogEnabled) {
         this.requestLogEnabled = requestLogEnabled;
     }
@@ -312,6 +419,9 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return corePoolSize;
     }
 
+    /**
+     * Core thread-pool size that gets passed to {@link 
java.util.concurrent.ThreadPoolExecutor#setCorePoolSize(int)}
+     */
     public void setCorePoolSize(Integer corePoolSize) {
         this.corePoolSize = corePoolSize;
     }
@@ -320,6 +430,11 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return maximumSize;
     }
 
+    /**
+     * Maximum thread-pool size that gets passed to {@link 
ThreadPoolExecutor#setMaximumPoolSize(int)}.
+     * This is the maximum amount of concurrency that can be supported without 
starting to reject HystrixCommands.
+     * Please note that this setting only takes effect if you also set 
allowMaximumSizeToDivergeFromCoreSize
+     */
     public void setMaximumSize(Integer maximumSize) {
         this.maximumSize = maximumSize;
     }
@@ -328,6 +443,9 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return keepAliveTime;
     }
 
+    /**
+     * Keep-alive time in minutes that gets passed to {@link 
ThreadPoolExecutor#setKeepAliveTime(long, TimeUnit)}
+     */
     public void setKeepAliveTime(Integer keepAliveTime) {
         this.keepAliveTime = keepAliveTime;
     }
@@ -336,6 +454,12 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return maxQueueSize;
     }
 
+    /**
+     * Max queue size that gets passed to {@link BlockingQueue} in 
HystrixConcurrencyStrategy.getBlockingQueue(int)
+     *
+     * This should only affect the instantiation of a threadpool - it is not 
eliglible to change a queue size on the fly.
+     * For that, use queueSizeRejectionThreshold().
+     */
     public void setMaxQueueSize(Integer maxQueueSize) {
         this.maxQueueSize = maxQueueSize;
     }
@@ -344,6 +468,14 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return queueSizeRejectionThreshold;
     }
 
+    /**
+     * Queue size rejection threshold is an artificial "max" size at which 
rejections will occur even
+     * if {@link #maxQueueSize} has not been reached. This is done because the 
{@link #maxQueueSize}
+     * of a {@link BlockingQueue} can not be dynamically changed and we want 
to support dynamically
+     * changing the queue size that affects rejections.
+     * <p>
+     * This is used by HystrixCommand when queuing a thread for execution.
+     */
     public void setQueueSizeRejectionThreshold(Integer 
queueSizeRejectionThreshold) {
         this.queueSizeRejectionThreshold = queueSizeRejectionThreshold;
     }
@@ -352,6 +484,10 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return threadPoolRollingNumberStatisticalWindowInMilliseconds;
     }
 
+    /**
+     * Duration of statistical rolling window in milliseconds.
+     * This is passed into HystrixRollingNumber inside each 
HystrixThreadPoolMetrics instance.
+     */
     public void 
setThreadPoolRollingNumberStatisticalWindowInMilliseconds(Integer 
threadPoolRollingNumberStatisticalWindowInMilliseconds) {
         this.threadPoolRollingNumberStatisticalWindowInMilliseconds = 
threadPoolRollingNumberStatisticalWindowInMilliseconds;
     }
@@ -360,6 +496,10 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return threadPoolRollingNumberStatisticalWindowBuckets;
     }
 
+    /**
+     * Number of buckets the rolling statistical window is broken into.
+     * This is passed into HystrixRollingNumber inside each 
HystrixThreadPoolMetrics instance.
+     */
     public void setThreadPoolRollingNumberStatisticalWindowBuckets(Integer 
threadPoolRollingNumberStatisticalWindowBuckets) {
         this.threadPoolRollingNumberStatisticalWindowBuckets = 
threadPoolRollingNumberStatisticalWindowBuckets;
     }
@@ -368,6 +508,9 @@ public class HystrixConfigurationCommon extends 
IdentifiedType {
         return allowMaximumSizeToDivergeFromCoreSize;
     }
 
+    /**
+     * Allows the configuration for maximumSize to take effect. That value can 
then be equal to, or higher, than coreSize
+     */
     public void setAllowMaximumSizeToDivergeFromCoreSize(Boolean 
allowMaximumSizeToDivergeFromCoreSize) {
         this.allowMaximumSizeToDivergeFromCoreSize = 
allowMaximumSizeToDivergeFromCoreSize;
     }

Reply via email to