waitUntilReady

suspend fun waitUntilReady(timeout: Duration, services: Set<ServiceType> = emptySet(), desiredState: ClusterState = ClusterState.ONLINE): Bucket

Waits until SDK bootstrap is complete and the desired ClusterState is observed.

Calling this method is optional. Without it, operations performed before the bucket is ready may take longer than usual, since the SDK needs to load the bucket config from the server first.

Parameters

timeout

the maximum time to wait for readiness.

services

the service types to wait for, or empty set to wait for all services.

Throws

com.couchbase.client.core.error.UnambiguousTimeoutException

if not ready before timeout