Package ai.vespa.feed.client
Class StaticThrottler
- java.lang.Object
-
- ai.vespa.feed.client.StaticThrottler
-
- Direct Known Subclasses:
DynamicThrottler
public class StaticThrottler extends 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
-
Constructor Summary
Constructors Constructor Description StaticThrottler(FeedClientBuilder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
sent(long inflight, CompletableFuture<ai.vespa.feed.client.HttpResponse> vessel)
void
success()
long
targetInflight()
void
throttled(long inflight)
-
-
-
Constructor Detail
-
StaticThrottler
public StaticThrottler(FeedClientBuilder builder)
-
-
Method Detail
-
sent
public void sent(long inflight, CompletableFuture<ai.vespa.feed.client.HttpResponse> vessel)
-
success
public void success()
-
throttled
public void throttled(long inflight)
-
targetInflight
public long targetInflight()
-
-