Class GatewayThrottler


  • public class GatewayThrottler
    extends java.lang.Object
    When the gateways says it can not handle more load, we should send less load. That is the responsibility of this component
    Author:
    dybis
    • Constructor Summary

      Constructors 
      Constructor Description
      GatewayThrottler​(long maxSleepTimeMs)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int distribute​(int expected)  
      void handleCall​(int transientErrors)  
      protected void sleepMs​(long sleepTime)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GatewayThrottler

        public GatewayThrottler​(long maxSleepTimeMs)
    • Method Detail

      • handleCall

        public void handleCall​(int transientErrors)
      • sleepMs

        protected void sleepMs​(long sleepTime)
      • distribute

        public int distribute​(int expected)