getAnyReplica method
Retrieves the value of the document from any of the available replicas.
This will return as soon as the first response is received from any replica node.
Implementation
Future<GetReplicaResult> getAnyReplica(
String key, [
GetAnyReplicaOptions? options,
]) async {
options ??= const GetAnyReplicaOptions();
final response = await _connection.getAnyReplica(
GetAnyReplicaRequest(
id: _documentId(key),
timeout: _kvTimeout(options),
),
);
return GetReplicaResult(
content: _decodeDocument(options, response.flags, response.value),
cas: response.cas,
isReplica: response.replica,
);
}