Package net.reevik.darkest.criteria
Class CountingCondition
java.lang.Object
net.reevik.darkest.criteria.CountingCondition
- All Implemented Interfaces:
RoutingCondition
Criterion which enables routing in case the number of requests reach a pre-configured threshold.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanRoute()Returns @code true} if the request should be routed.
-
Constructor Details
-
CountingCondition
public CountingCondition(int mod)
-
-
Method Details
-
canRoute
public boolean canRoute()Description copied from interface:RoutingConditionReturns @code true} if the request should be routed.- Specified by:
canRoutein interfaceRoutingCondition- Returns:
trueif the request should be routed.
-