Class SimpleRateLimiter

java.lang.Object
io.datarouter.ratelimiter.SimpleRateLimiter

public class SimpleRateLimiter
extends java.lang.Object
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected java.lang.Long nextAllowed  
  • Constructor Summary

    Constructors 
    Constructor Description
    SimpleRateLimiter​(long rateLimitMilliseconds)  
  • Method Summary

    Modifier and Type Method Description
    void customDelay​(long rateLimit)  
    long getRateLimitMilliseconds()  
    boolean isAllowed​(boolean wait)  
    void next()  
    void waitForPermission​(boolean evenIfExtended, boolean incrementNext)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details