Package com.github.ambry.commons
Class Criteria
- java.lang.Object
-
- com.github.ambry.commons.Criteria
-
public class Criteria extends java.lang.Object
Criteria is a data structure that holds predefined threshold value and its type (UpperBound or LowerBound). To meet criteria, the measured value should be lower(higher) than the predefined threshold value if threshold is defined as UpperBound(LowerBound).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Criteria.BoundType
-
Constructor Summary
Constructors Constructor Description Criteria()
Default ctor for mapping JSONObject to object.Criteria(long threshold, Criteria.BoundType boundType)
Criteria ctor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Criteria.BoundType
getBoundType()
long
getThreshold()
long
getThresholdValue()
void
setBoundType(Criteria.BoundType boundType)
void
setThreshold(long threshold)
-
-
-
Constructor Detail
-
Criteria
public Criteria(long threshold, Criteria.BoundType boundType)
Criteria ctor- Parameters:
threshold
- the predefined value of thresholdboundType
- specifies whether this threshold is UpperBound or LowerBound.
-
Criteria
public Criteria()
Default ctor for mapping JSONObject to object.
-
-
Method Detail
-
getThresholdValue
public long getThresholdValue()
- Returns:
- the threshold value associated with this criteria
-
getBoundType
public Criteria.BoundType getBoundType()
-
setBoundType
public void setBoundType(Criteria.BoundType boundType)
-
getThreshold
public long getThreshold()
-
setThreshold
public void setThreshold(long threshold)
-
-