Skip to content

Timeouts and cancellation

The SDK configures an HttpRequest timeout for every operation. Default: 30 seconds.

var options = new OkatanaRequestOptions()
    .timeout(Duration.ofSeconds(8));

client.projects().get(projectId, options);

The connection timeout is configured on the JDK HttpClient created by the SDK. If you inject your own HttpClient, its connection behavior belongs to that client.

The synchronous API also responds to thread interruption. If a request wait or retry sleep is interrupted, the SDK restores the interruption flag and throws OkatanaTransportException.

For high-concurrency Java 21 services, synchronous SDK calls can be executed on virtual threads so each integration operation retains straightforward blocking control flow without consuming one platform thread per request.