Class Timeout
-
- All Implemented Interfaces:
public final class TimeoutA class containing timeouts for various processing phases of a request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classTimeout.BuilderA builder for Timeout.
-
Method Summary
Modifier and Type Method Description final Durationconnect()The maximum time allowed to establish a connection with a host. final Durationread()The maximum time allowed between two data packets when waiting for the server’s response. final Durationwrite()The maximum time allowed between two data packets when sending the request to the server. final Durationrequest()The maximum time allowed for a complete HTTP call, not including retries. final Timeout.BuildertoBuilder()Booleanequals(Object other)IntegerhashCode()StringtoString()final static Timeoutdefault()final static Timeout.Builderbuilder()Returns a mutable builder for constructing an instance of Timeout. -
-
Method Detail
-
connect
final Duration connect()
The maximum time allowed to establish a connection with a host.
A value of Duration.ZERO means there's no timeout.
Defaults to
Duration.ofMinutes(1).
-
read
final Duration read()
The maximum time allowed between two data packets when waiting for the server’s response.
A value of Duration.ZERO means there's no timeout.
Defaults to
request().
-
write
final Duration write()
The maximum time allowed between two data packets when sending the request to the server.
A value of Duration.ZERO means there's no timeout.
Defaults to
request().
-
request
final Duration request()
The maximum time allowed for a complete HTTP call, not including retries.
This includes resolving DNS, connecting, writing the request body, server processing, as well as reading the response body.
A value of Duration.ZERO means there's no timeout.
Defaults to
Duration.ofMinutes(10).
-
toBuilder
final Timeout.Builder toBuilder()
-
builder
final static Timeout.Builder builder()
Returns a mutable builder for constructing an instance of Timeout.
-
-
-
-