Class DoSHandler.LeakingBucketTrackerFactory

java.lang.Object
org.eclipse.jetty.server.handler.DoSHandler.LeakingBucketTrackerFactory
All Implemented Interfaces:
DoSHandler.Tracker.Factory
Enclosing class:
DoSHandler

public static class DoSHandler.LeakingBucketTrackerFactory extends Object implements DoSHandler.Tracker.Factory
The Tracker implements the classic Leaky Bucket Algorithm.
  • Constructor Details

    • LeakingBucketTrackerFactory

      public LeakingBucketTrackerFactory(@Name("maxRequestsPerSecond") int maxRequestsPerSecond)
      Parameters:
      maxRequestsPerSecond - the maximum requests per second allowed by this tracker
    • LeakingBucketTrackerFactory

      public LeakingBucketTrackerFactory(@Name("maxRequestsPerSecond") int maxRequestsPerSecond, @Name("bucketSize") int bucketSize, @Name("idleTimeout") Duration idleTimeout)
      Parameters:
      maxRequestsPerSecond - the maximum requests per second allowed by this tracker
      bucketSize - the size of the bucket in request/drips, which is effectively the burst capacity, giving the number of request that can be handled in excess of the short term rate, before being rejected. Use -1 for a heuristic value.
      idleTimeout - The period to keep an empty bucket before removal, or null to remove a bucket immediately when empty
  • Method Details