LookupInAnyReplicaOptions
in package
Table of Contents
- $readPreference : string
- $timeoutMilliseconds : int|null
- $transcoder : Transcoder
- $withExpiry : bool|null
- __construct() : mixed
- build() : LookupInAnyReplicaOptions
- Static helper to keep code more readable
- getTranscoder() : Transcoder
- Returns associated transcoder.
- readPreference() : LookupInAnyReplicaOptions
- 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() : LookupInAnyReplicaOptions
- Sets the operation timeout in milliseconds.
- transcoder() : LookupInAnyReplicaOptions
- Associate custom transcoder with the request.
- withExpiry() : LookupInAnyReplicaOptions
- Sets whether to include document expiry with the document content.
Properties
$readPreference
private
string
$readPreference
$timeoutMilliseconds
private
int|null
$timeoutMilliseconds
= null
$transcoder
private
Transcoder
$transcoder
$withExpiry
private
bool|null
$withExpiry
= null
Methods
__construct()
public
__construct() : mixed
Tags
Return values
mixed —build()
Static helper to keep code more readable
public
static build() : LookupInAnyReplicaOptions
Tags
Return values
LookupInAnyReplicaOptions —getTranscoder()
Returns associated transcoder.
public
static getTranscoder(LookupInAnyReplicaOptions|null $options) : Transcoder
Parameters
- $options : LookupInAnyReplicaOptions|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) : LookupInAnyReplicaOptions
Parameters
- $readPreference : string
Tags
Return values
LookupInAnyReplicaOptions —timeout()
Sets the operation timeout in milliseconds.
public
timeout(int $milliseconds) : LookupInAnyReplicaOptions
Parameters
- $milliseconds : int
-
the operation timeout to apply
Tags
Return values
LookupInAnyReplicaOptions —transcoder()
Associate custom transcoder with the request.
public
transcoder(Transcoder $transcoder) : LookupInAnyReplicaOptions
Parameters
- $transcoder : Transcoder
Tags
Return values
LookupInAnyReplicaOptions —withExpiry()
Sets whether to include document expiry with the document content.
public
withExpiry(bool $fetchExpiry) : LookupInAnyReplicaOptions
When used this option will add one extra subdocument path into the LookupIn operation. This can cause the set of subdocument paths to exceed the maximum number (16) of paths allowed in a subdocument operation.
Parameters
- $fetchExpiry : bool
-
whether to include document expiry