GetAnyReplicaOptions
in package
Table of Contents
- $readPreference : string
- $timeoutMilliseconds : int|null
- $transcoder : Transcoder
- __construct() : mixed
- build() : GetAnyReplicaOptions
- Static helper to keep code more readable
- getTranscoder() : Transcoder
- Returns associated transcoder.
- readPreference() : GetAnyReplicaOptions
- Choose how the replica nodes will be selected. By default, it has no preference and will select any available replica, but it is possible to prioritize or restrict to only nodes in local server group
- timeout() : GetAnyReplicaOptions
- Sets the operation timeout in milliseconds.
- transcoder() : GetAnyReplicaOptions
- Associate custom transcoder with the request.
Properties
$readPreference
private
string
$readPreference
$timeoutMilliseconds
private
int|null
$timeoutMilliseconds
= null
$transcoder
private
Transcoder
$transcoder
Methods
__construct()
public
__construct() : mixed
Tags
Return values
mixed —build()
Static helper to keep code more readable
public
static build() : GetAnyReplicaOptions
Tags
Return values
GetAnyReplicaOptions —getTranscoder()
Returns associated transcoder.
public
static getTranscoder(GetAnyReplicaOptions|null $options) : Transcoder
Parameters
- $options : GetAnyReplicaOptions|null
Tags
Return values
Transcoder —readPreference()
Choose how the replica nodes will be selected. By default, it has no preference and will select any available replica, but it is possible to prioritize or restrict to only nodes in local server group
public
readPreference(string $readPreference) : GetAnyReplicaOptions
Parameters
- $readPreference : string
Tags
Return values
GetAnyReplicaOptions —timeout()
Sets the operation timeout in milliseconds.
public
timeout(int $milliseconds) : GetAnyReplicaOptions
Parameters
- $milliseconds : int
-
the operation timeout to apply
Tags
Return values
GetAnyReplicaOptions —transcoder()
Associate custom transcoder with the request.
public
transcoder(Transcoder $transcoder) : GetAnyReplicaOptions
Parameters
- $transcoder : Transcoder