Enum Variable.Type
- java.lang.Object
-
- java.lang.Enum<Variable.Type>
-
- org.apache.solr.client.solrj.cloud.autoscaling.Variable.Type
-
- All Implemented Interfaces:
Serializable,Comparable<Variable.Type>,Variable
- Enclosing interface:
- Variable
public static enum Variable.Type extends Enum<Variable.Type> implements Variable
Type details of each variable in policies
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.solr.client.solrj.cloud.autoscaling.Variable
Variable.Meta, Variable.Type
-
-
Field Summary
Fields Modifier and Type Field Description BooleanadditiveSet<String>associatedPerNodeValuesNumbermaxVariable.MetametaStringmetricsAttributeNumberminStringperReplicaValueSet<ComputedType>supportedComputedTypesStringtagNameClasstypeSet<String>valsSet<String>wildCards-
Fields inherited from interface org.apache.solr.client.solrj.cloud.autoscaling.Variable
coreidxsize, NULL
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddViolatingReplicas(org.apache.solr.client.solrj.cloud.autoscaling.Violation.Ctx ctx)intcompareViolation(Violation v1, Violation v2)voidcomputeDeviation(Policy.Session session, double[] deviations, org.apache.solr.client.solrj.cloud.autoscaling.ReplicaCount replicaCount, SealedClause sealedClause)ObjectcomputeValue(Policy.Session session, Condition condition, String collection, String shard, String node)When a non constant value is used in a variable, the actual value needs to be computed at the runtimeObjectconvertVal(Object val)OperandgetOperand(Operand expected, Object val, ComputedType computedType)voidgetSuggestions(org.apache.solr.client.solrj.cloud.autoscaling.Suggestion.Ctx ctx)StringgetTagName()booleanmatch(Object inputVal, Operand op, Object val, String name, Row row)StringpostValidate(Condition condition)voidprojectAddReplica(Cell cell, ReplicaInfo ri, Consumer<org.apache.solr.client.solrj.cloud.autoscaling.Row.OperationInfo> opCollector, boolean strictMode)Simulate a replica addition to a node in the clustervoidprojectRemoveReplica(Cell cell, ReplicaInfo ri, Consumer<org.apache.solr.client.solrj.cloud.autoscaling.Row.OperationInfo> opCollector)Objectvalidate(String name, Object val, boolean isRuleVal)static Variable.TypevalueOf(String name)Returns the enum constant of this type with the specified name.static Variable.Type[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
WITH_COLLECTION
public static final Variable.Type WITH_COLLECTION
-
COLL
public static final Variable.Type COLL
-
SHARD
public static final Variable.Type SHARD
-
REPLICA
public static final Variable.Type REPLICA
-
PORT
public static final Variable.Type PORT
-
IP_1
public static final Variable.Type IP_1
-
IP_2
public static final Variable.Type IP_2
-
IP_3
public static final Variable.Type IP_3
-
IP_4
public static final Variable.Type IP_4
-
FREEDISK
public static final Variable.Type FREEDISK
-
TOTALDISK
public static final Variable.Type TOTALDISK
-
CORE_IDX
public static final Variable.Type CORE_IDX
-
NODE_ROLE
public static final Variable.Type NODE_ROLE
-
CORES
public static final Variable.Type CORES
-
SYSLOADAVG
public static final Variable.Type SYSLOADAVG
-
HEAPUSAGE
public static final Variable.Type HEAPUSAGE
-
NUMBER
public static final Variable.Type NUMBER
-
HOST
public static final Variable.Type HOST
-
STRING
public static final Variable.Type STRING
-
NODE
public static final Variable.Type NODE
-
LAZY
public static final Variable.Type LAZY
-
DISKTYPE
public static final Variable.Type DISKTYPE
-
-
Field Detail
-
tagName
public final String tagName
-
type
public final Class type
-
meta
public Variable.Meta meta
-
min
public final Number min
-
max
public final Number max
-
additive
public final Boolean additive
-
perReplicaValue
public final String perReplicaValue
-
metricsAttribute
public final String metricsAttribute
-
supportedComputedTypes
public final Set<ComputedType> supportedComputedTypes
-
-
Method Detail
-
values
public static Variable.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Variable.Type c : Variable.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Variable.Type valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getTagName
public String getTagName()
-
getSuggestions
public void getSuggestions(org.apache.solr.client.solrj.cloud.autoscaling.Suggestion.Ctx ctx)
- Specified by:
getSuggestionsin interfaceVariable
-
addViolatingReplicas
public boolean addViolatingReplicas(org.apache.solr.client.solrj.cloud.autoscaling.Violation.Ctx ctx)
- Specified by:
addViolatingReplicasin interfaceVariable
-
getOperand
public Operand getOperand(Operand expected, Object val, ComputedType computedType)
- Specified by:
getOperandin interfaceVariable
-
convertVal
public Object convertVal(Object val)
- Specified by:
convertValin interfaceVariable
-
postValidate
public String postValidate(Condition condition)
- Specified by:
postValidatein interfaceVariable
-
projectAddReplica
public void projectAddReplica(Cell cell, ReplicaInfo ri, Consumer<org.apache.solr.client.solrj.cloud.autoscaling.Row.OperationInfo> opCollector, boolean strictMode)
Simulate a replica addition to a node in the cluster- Specified by:
projectAddReplicain interfaceVariable
-
projectRemoveReplica
public void projectRemoveReplica(Cell cell, ReplicaInfo ri, Consumer<org.apache.solr.client.solrj.cloud.autoscaling.Row.OperationInfo> opCollector)
- Specified by:
projectRemoveReplicain interfaceVariable
-
compareViolation
public int compareViolation(Violation v1, Violation v2)
- Specified by:
compareViolationin interfaceVariable
-
computeValue
public Object computeValue(Policy.Session session, Condition condition, String collection, String shard, String node)
Description copied from interface:VariableWhen a non constant value is used in a variable, the actual value needs to be computed at the runtime- Specified by:
computeValuein interfaceVariable
-
computeDeviation
public void computeDeviation(Policy.Session session, double[] deviations, org.apache.solr.client.solrj.cloud.autoscaling.ReplicaCount replicaCount, SealedClause sealedClause)
- Specified by:
computeDeviationin interfaceVariable
-
-