Class StaticThrottler

  • Direct Known Subclasses:
    DynamicThrottler

    public class StaticThrottler
    extends java.lang.Object
    Reduces max throughput whenever throttled; increases it slowly whenever successful responses are obtained.
    Author:
    jonmv
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected long maxInflight  
      protected long minInflight  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void sent​(long inflight, java.util.concurrent.CompletableFuture<ai.vespa.feed.client.HttpResponse> vessel)  
      void success()  
      long targetInflight()  
      void throttled​(long inflight)  
      • Methods inherited from class java.lang.Object

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

      • maxInflight

        protected final long maxInflight
      • minInflight

        protected final long minInflight
    • Method Detail

      • sent

        public void sent​(long inflight,
                         java.util.concurrent.CompletableFuture<ai.vespa.feed.client.HttpResponse> vessel)
      • success

        public void success()
      • throttled

        public void throttled​(long inflight)
      • targetInflight

        public long targetInflight()