Package com.helixframework.okhttp.sla
Class PathThresholdPredicate
java.lang.Object
com.helixframework.okhttp.sla.PathThresholdPredicate
- All Implemented Interfaces:
BiPredicate<okhttp3.Request,Duration>
Predicate that determines if the supplied request poth matches and the supplied duration
surpasses the request SLA threshold.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance ofPathThresholdPredicatethat matches all paths and sets an SLA threshold of 5 seconds.PathThresholdPredicate(Map<Pattern, Duration> slas) Creates a new instance ofPathThresholdPredicatewith the supplied path patterns and SLAs. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiPredicate
and, negate, or
-
Constructor Details
-
PathThresholdPredicate
public PathThresholdPredicate()Creates a new instance ofPathThresholdPredicatethat matches all paths and sets an SLA threshold of 5 seconds. -
PathThresholdPredicate
Creates a new instance ofPathThresholdPredicatewith the supplied path patterns and SLAs.- Parameters:
slas- slas
-
-
Method Details
-
test
- Specified by:
testin interfaceBiPredicate<okhttp3.Request,Duration>
-