Package redis.clients.jedis.timeseries
Enum DuplicatePolicy
- java.lang.Object
-
- java.lang.Enum<DuplicatePolicy>
-
- redis.clients.jedis.timeseries.DuplicatePolicy
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<DuplicatePolicy>,Rawable
public enum DuplicatePolicy extends java.lang.Enum<DuplicatePolicy> implements Rawable
Policy that will define handling of duplicate samples.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BLOCKAn error will occur for any out of order sampleFIRSTIgnore the new valueLASTOverride with latest valueMAXOnly override if the value is higher than the existing valueMINOnly override if the value is lower than the existing valueSUMIf a previous sample exists, add the new sample to it so that the updated value is
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getRaw()Get byte array representation.static DuplicatePolicyvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static DuplicatePolicy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BLOCK
public static final DuplicatePolicy BLOCK
An error will occur for any out of order sample
-
FIRST
public static final DuplicatePolicy FIRST
Ignore the new value
-
LAST
public static final DuplicatePolicy LAST
Override with latest value
-
MIN
public static final DuplicatePolicy MIN
Only override if the value is lower than the existing value
-
MAX
public static final DuplicatePolicy MAX
Only override if the value is higher than the existing value
-
SUM
public static final DuplicatePolicy SUM
If a previous sample exists, add the new sample to it so that the updated value is
-
-
Method Detail
-
values
public static DuplicatePolicy[] 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 (DuplicatePolicy c : DuplicatePolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DuplicatePolicy valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-