org.apache.solr.client.solrj.cloud.autoscaling

## Class Clause

- java.lang.Object
- - org.apache.solr.client.solrj.cloud.autoscaling.Clause

All Implemented Interfaces:
  Comparable<Clause>, MapSerializable, MapWriter, NavigableObject

Direct Known Subclasses:
  SealedClause

Deprecated.
to be removed in Solr 9.0 (see SOLR-14656)

    public class Clause
    extends Object
    implements MapWriter, Comparable<Clause>

Represents a set of conditions in the policy

### Nested Class Summary

Nested Classes
`static class` `Clause.ComputedValueEvaluator` Deprecated.

### Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriter

`MapWriter.EntryWriter`

### Field Summary

Fields
`static long` `addReplicaCountsForNode` Deprecated.
`static long` `addReplicaCountsForNodeCacheMiss` Deprecated.
`static String` `METRICS_PREFIX` Deprecated.
`static String` `NODESET` Deprecated.
`static String` `PERSHARD_REPLICAS` Deprecated.

### Constructor Summary

Constructors
`protected` `Clause(Clause clause, Function<Condition,Object> computedValueEvaluator)` Deprecated.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
`int` `compareTo(Clause that)` Deprecated.
`static Clause` `create(Map<String,Object> m)` Deprecated.
`static Clause` `create(String json)` Deprecated.
`boolean` `doesOverride(Clause that)` Deprecated.
`boolean` `equals(Object o)` Deprecated.
`Condition` `getCollection()` Deprecated.
`Condition` `getGlobalTag()` Deprecated.
`Condition` `getReplica()` Deprecated.
`SealedClause` `getSealedClause(Function<Condition,Object> computedValueEvaluator)` Deprecated.
`Condition` `getShard()` Deprecated.
`Condition` `getTag()` Deprecated.
`Condition` `getThirdTag()` Deprecated.
`int` `hashCode()` Deprecated.
`boolean` `isMatch(ReplicaInfo r, String collection, String shard)` Deprecated.
`boolean` `isPerCollectiontag()` Deprecated.
`boolean` `isStrict()` Deprecated.
`static Double` `parseDouble(String name, Object val)` Deprecated.
`static Long` `parseLong(String name, Object val)` Deprecated.
`static String` `parseString(Object val)` Deprecated.
`List<Violation>` `test(Policy.Session session, double[] deviations)` Deprecated.
`static void` `throwExp(Map clause, String msg, Object... args)` Deprecated.
`String` `toString()` Deprecated.
`static Object` `validate(String name, Object val, boolean isRuleVal)` Deprecated.
`void` `writeMap(MapWriter.EntryWriter ew)` Deprecated.

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.apache.solr.common.MapWriter

`jsonStr, toMap`

### Methods inherited from interface org.apache.solr.common.NavigableObject

`_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr, _size`

### Field Detail

#### NODESET

    public static final String NODESET

Deprecated.

See Also:
  Constant Field Values

#### addReplicaCountsForNode

    public static long addReplicaCountsForNode

Deprecated.

#### addReplicaCountsForNodeCacheMiss

    public static long addReplicaCountsForNodeCacheMiss

Deprecated.

#### PERSHARD_REPLICAS

    public static final String PERSHARD_REPLICAS

Deprecated.

#### METRICS_PREFIX

    public static final String METRICS_PREFIX

Deprecated.

See Also:
  Constant Field Values

### Constructor Detail

#### Clause

    protected Clause(Clause clause,
                     Function<Condition,Object> computedValueEvaluator)

Deprecated.

### Method Detail

#### getThirdTag

    public Condition getThirdTag()

Deprecated.

#### create

    public static Clause create(String json)

Deprecated.

#### create

    public static Clause create(Map<String,Object> m)

Deprecated.

#### parseString

    public static String parseString(Object val)

Deprecated.

#### getCollection

    public Condition getCollection()

Deprecated.

#### getShard

    public Condition getShard()

Deprecated.

#### getReplica

    public Condition getReplica()

Deprecated.

#### getTag

    public Condition getTag()

Deprecated.

#### getGlobalTag

    public Condition getGlobalTag()

Deprecated.

#### doesOverride

    public boolean doesOverride(Clause that)

Deprecated.

#### isPerCollectiontag

    public boolean isPerCollectiontag()

Deprecated.

#### compareTo

    public int compareTo(Clause that)

Deprecated.

Specified by:
  `compareTo` in interface `Comparable<Clause>`

#### equals

    public boolean equals(Object o)

Deprecated.

Overrides:
  `equals` in class `Object`

#### getSealedClause

    public SealedClause getSealedClause(Function<Condition,Object> computedValueEvaluator)

Deprecated.

#### throwExp

    public static void throwExp(Map clause,
                                String msg,
                                Object... args)

Deprecated.

#### test

    public List<Violation> test(Policy.Session session,
                                double[] deviations)

Deprecated.

#### isMatch

    public boolean isMatch(ReplicaInfo r,
                           String collection,
                           String shard)

Deprecated.

#### isStrict

    public boolean isStrict()

Deprecated.

#### toString

    public String toString()

Deprecated.

Overrides:
  `toString` in class `Object`

#### writeMap

    public void writeMap(MapWriter.EntryWriter ew)
                  throws IOException

Deprecated.

Specified by:
  `writeMap` in interface `MapWriter`
Throws:
  `IOException`

#### validate

    public static Object validate(String name,
                                  Object val,
                                  boolean isRuleVal)

Deprecated.

Parameters:
  `name` - name of the condition
  `val` - value of the condition
  `isRuleVal` - is this provided in the rule
Returns:
  actual validated value

#### parseLong

    public static Long parseLong(String name,
                                 Object val)

Deprecated.

#### hashCode

    public int hashCode()

Deprecated.

Overrides:
  `hashCode` in class `Object`

#### parseDouble

    public static Double parseDouble(String name,
                                     Object val)

Deprecated.