summaryrefslogtreecommitdiffstats
path: root/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequest.java
diff options
context:
space:
mode:
Diffstat (limited to 'vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequest.java')
-rw-r--r--vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequest.java11
1 files changed, 1 insertions, 10 deletions
diff --git a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequest.java b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequest.java
index fdd35b74c35..6de3f034f22 100644
--- a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequest.java
+++ b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequest.java
@@ -3,7 +3,6 @@ package ai.vespa.feed.client.impl;
import java.time.Duration;
import java.util.Map;
-import java.util.function.LongSupplier;
import java.util.function.Supplier;
class HttpRequest {
@@ -13,17 +12,13 @@ class HttpRequest {
private final Map<String, Supplier<String>> headers;
private final byte[] body;
private final Duration timeout;
- private final long deadlineNanos;
- private final LongSupplier nanoClock;
- public HttpRequest(String method, String path, Map<String, Supplier<String>> headers, byte[] body, Duration timeout, LongSupplier nanoClock) {
+ public HttpRequest(String method, String path, Map<String, Supplier<String>> headers, byte[] body, Duration timeout) {
this.method = method;
this.path = path;
this.headers = headers;
this.body = body;
- this.deadlineNanos = nanoClock.getAsLong() + timeout.toNanos();
this.timeout = timeout;
- this.nanoClock = nanoClock;
}
public String method() {
@@ -42,10 +37,6 @@ class HttpRequest {
return body;
}
- public Duration timeLeft() {
- return Duration.ofNanos(deadlineNanos - nanoClock.getAsLong());
- }
-
public Duration timeout() {
return timeout;
}