aboutsummaryrefslogtreecommitdiffstats
path: root/jaxrs_client_utils/src/main/java/com/yahoo/vespa/jaxrs/client/LegacyJaxRsTimeouts.java
blob: 7bc3a450f5157922199524dc43ad6fd1bd67d4a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.yahoo.vespa.jaxrs.client;

import java.time.Duration;

/**
 * Legacy defaults for timeouts.
 *
 * Clients should instead define their own JaxRsTimeouts tailored to their use-case.
 *
 * @author hakonhall
 */
// Immutable
public class LegacyJaxRsTimeouts implements JaxRsTimeouts {
    private static final Duration CONNECT_TIMEOUT = Duration.ofSeconds(30);
    private static final Duration READ_TIMEOUT = Duration.ofSeconds(30);

    @Override
    public Duration getConnectTimeout() {
        return CONNECT_TIMEOUT;
    }

    @Override
    public Duration getReadTimeout() {
        return READ_TIMEOUT;
    }
}