public static final class HystrixObservableCommand.Setter
extends java.lang.Object
HystrixObservableCommand
constructor.
The required arguments are set via the 'with' factory method and optional arguments via the 'and' chained methods.
Example:
Setter.withGroupKey(HystrixCommandGroupKey.Factory.asKey("GroupName"))
.andCommandKey(HystrixCommandKey.Factory.asKey("CommandName"))
.andEventNotifier(notifier);
Modifier and Type | Field and Description |
---|---|
protected HystrixCommandKey |
commandKey |
protected HystrixCommandProperties.Setter |
commandPropertiesDefaults |
protected HystrixCommandGroupKey |
groupKey |
protected HystrixThreadPoolKey |
threadPoolKey |
protected HystrixThreadPoolProperties.Setter |
threadPoolPropertiesDefaults |
Modifier | Constructor and Description |
---|---|
protected |
Setter(HystrixCommandGroupKey groupKey)
Setter factory method containing required values.
|
Modifier and Type | Method and Description |
---|---|
HystrixObservableCommand.Setter |
andCommandKey(HystrixCommandKey commandKey) |
HystrixObservableCommand.Setter |
andCommandPropertiesDefaults(HystrixCommandProperties.Setter commandPropertiesDefaults)
Optional
|
static HystrixObservableCommand.Setter |
withGroupKey(HystrixCommandGroupKey groupKey)
Setter factory method with required values.
|
protected HystrixCommandKey commandKey
protected HystrixCommandProperties.Setter commandPropertiesDefaults
protected final HystrixCommandGroupKey groupKey
protected HystrixThreadPoolKey threadPoolKey
protected HystrixThreadPoolProperties.Setter threadPoolPropertiesDefaults
protected Setter(HystrixCommandGroupKey groupKey)
All optional arguments can be set via the chained methods.
groupKey
- HystrixCommandGroupKey
used to group together multiple HystrixObservableCommand
objects.
The HystrixCommandGroupKey
is used to represent a common relationship between commands. For example, a library or team name, the system all related commands interace
with,
common business purpose etc.
public static HystrixObservableCommand.Setter withGroupKey(HystrixCommandGroupKey groupKey)
All optional arguments can be set via the chained methods.
groupKey
- HystrixCommandGroupKey
used to group together multiple HystrixObservableCommand
objects.
The HystrixCommandGroupKey
is used to represent a common relationship between commands. For example, a library or team name, the system all related commands interace
with,
common business purpose etc.
public HystrixObservableCommand.Setter andCommandKey(HystrixCommandKey commandKey)
commandKey
- HystrixCommandKey
used to identify a HystrixObservableCommand
instance for statistics, circuit-breaker, properties, etc.
By default this will be derived from the instance class name.
NOTE: Every unique HystrixCommandKey
will result in new instances of HystrixCircuitBreaker
, HystrixCommandMetrics
and HystrixCommandProperties
.
Thus,
the number of variants should be kept to a finite and reasonable number to avoid high-memory usage or memory leacks.
Hundreds of keys is fine, tens of thousands is probably not.
public HystrixObservableCommand.Setter andCommandPropertiesDefaults(HystrixCommandProperties.Setter commandPropertiesDefaults)
commandPropertiesDefaults
- HystrixCommandProperties.Setter
with property overrides for this specific instance of HystrixObservableCommand
.
See the HystrixPropertiesStrategy
JavaDocs for more information on properties and order of precedence.