public static enum SteeringPolicyRule.RuleType extends Enum<SteeringPolicyRule.RuleType>
The type of a rule determines its sorting/filtering behavior.
FILTER
- Filters the list of answers based on their defined boolean data. Answers remain
only if their shouldKeep
value is true
.
HEALTH
- Removes answers from the list if their rdata
matches a target in the
health check monitor referenced by the steering policy and the target is reported down.
WEIGHTED
- Uses a number between 0 and 255 to determine how often an answer will be served
in relation to other answers. Anwers with a higher weight will be served more frequently.
PRIORITY
- Uses a defined rank value of answers to determine which answer to serve,
moving those with the lowest values to the beginning of the list without changing the
relative order of those with the same value. Answers can be given a value between 0
and 255
.
LIMIT
- Filters answers that are too far down the list. Parameter defaultCount
specifies how many answers to keep. Example: If defaultCount
has a value of 2
and
there are five answers left, when the LIMIT
rule is processed, only the first two answers
will remain in the list.Enum Constant and Description |
---|
Filter |
Health |
Limit |
Priority |
UnknownEnumValue
This value is used if a service returns a value for this enum that is not recognized by this
version of the SDK.
|
Weighted |
Modifier and Type | Method and Description |
---|---|
static SteeringPolicyRule.RuleType |
create(String key) |
String |
getValue() |
static SteeringPolicyRule.RuleType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SteeringPolicyRule.RuleType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SteeringPolicyRule.RuleType Filter
public static final SteeringPolicyRule.RuleType Health
public static final SteeringPolicyRule.RuleType Weighted
public static final SteeringPolicyRule.RuleType Priority
public static final SteeringPolicyRule.RuleType Limit
public static final SteeringPolicyRule.RuleType UnknownEnumValue
public static SteeringPolicyRule.RuleType[] values()
for (SteeringPolicyRule.RuleType c : SteeringPolicyRule.RuleType.values()) System.out.println(c);
public static SteeringPolicyRule.RuleType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getValue()
public static SteeringPolicyRule.RuleType create(String key)
Copyright © 2016–2022. All rights reserved.