Class CountingCondition

java.lang.Object
net.reevik.darkest.criteria.CountingCondition
All Implemented Interfaces:
RoutingCondition

public class CountingCondition extends Object implements RoutingCondition
Criterion which enables routing in case the number of requests reach a pre-configured threshold.
  • Constructor Details

    • CountingCondition

      public CountingCondition(int mod)
  • Method Details

    • canRoute

      public boolean canRoute()
      Description copied from interface: RoutingCondition
      Returns @code true} if the request should be routed.
      Specified by:
      canRoute in interface RoutingCondition
      Returns:
      true if the request should be routed.