public enum OverflowResolver extends Enum<OverflowResolver>
AbstractHistogram may throw ArrayIndexOutOfBoundsException in the method AbstractHistogram.recordValue(long)
if value is exceeds highestTrackableValue, so OverflowResolver is addressed to solve this problem.RollingHdrHistogramBuilder.withHighestTrackableValue(long, OverflowResolver),
AbstractHistogram.recordValue(long)| Enum Constant and Description |
|---|
PASS_THRU
Do not resolve overflow, just passes the value directly to
AbstractHistogram.recordValue(long)
as result ArrayIndexOutOfBoundsException may be thrown. |
REDUCE_TO_HIGHEST_TRACKABLE
Resolves overflow by replacing the exceeded value by highestTrackableValue.
|
SKIP
Resolves overflow by skipping value which is exceeds highestTrackableValue, so exceeded value will not be stored.
|
| Modifier and Type | Method and Description |
|---|---|
static OverflowResolver |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static OverflowResolver[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OverflowResolver REDUCE_TO_HIGHEST_TRACKABLE
public static final OverflowResolver SKIP
public static final OverflowResolver PASS_THRU
AbstractHistogram.recordValue(long)
as result ArrayIndexOutOfBoundsException may be thrown.
Use this way with double attention iff you clearly understanding what you do.
public static OverflowResolver[] values()
for (OverflowResolver c : OverflowResolver.values()) System.out.println(c);
public static OverflowResolver 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 nullCopyright © 2020. All rights reserved.