getReplica

suspend fun getReplica(id: String, strategy: GetReplicaStrategy = GetReplicaStrategy.any(), common: CommonOptions = CommonOptions.Default): GetReplicaResult

Reads a document from a replica.

Parameters

id

the ID of the document to get.

Throws

com.couchbase.client.core.error.DocumentNotFoundOnReplicaException

if the specified replica document does not exist.

com.couchbase.client.core.error.ReplicaIndexOutOfBoundsException

if the strategy specifies a replica index not less than the number of replicas configured for the bucket.

com.couchbase.client.core.error.ReplicaIndexCurrentlyUnavailableException

if the strategy specifies a replica index that is not currently available.