ReadPreference
final class ReadPreference implements Serializable (View source)
Class ReadPreference
Constants
PRIMARY
Since: 1.7.0
|
|
PRIMARY_PREFERRED
Since: 1.7.0
|
|
SECONDARY
Since: 1.7.0
|
|
SECONDARY_PREFERRED
Since: 1.7.0
|
|
NEAREST
Since: 1.7.0
|
|
NO_MAX_STALENESS
Since: 1.2.0
|
|
SMALLEST_MAX_STALENESS_SECONDS
Since: 1.2.0
|
|
Methods
__construct(string $mode, array|null $tagSets = null, array|null $options = null)
Construct immutable ReadPreference
static
__set_state(array $properties)
No description
object|null
getHedge()
Returns the ReadPreference's "hedge" option
string
getModeString()
Returns the ReadPreference's "mode" option as a string
array
getTagSets()
Returns the ReadPreference's "tagSets" option
PackedArray
bsonSerialize()
Returns an object for BSON serialization
getMaxStalenessSeconds()
No description
Details
final
__construct(string $mode, array|null $tagSets = null, array|null $options = null)
Construct immutable ReadPreference
static
__set_state(array $properties)
No description
final object|null
getHedge()
Since: 1.8.0
Returns the ReadPreference's "hedge" option
final string
getModeString()
Since: 1.7.0
Returns the ReadPreference's "mode" option as a string
final array
getTagSets()
Returns the ReadPreference's "tagSets" option
final PackedArray
bsonSerialize()
Since: 1.2.0
Returns an object for BSON serialization
final
getMaxStalenessSeconds()
No description