|
The MongoDB\Driver\ReadPreference classIntroduction
Class synopsisMongoDB\Driver\ReadPreference
final
class MongoDB\Driver\ReadPreference
implements
MongoDB\BSON\Serializable, Serializable {
/* Constants */
const
int
MongoDB\Driver\ReadPreference::RP_PRIMARY = 1;
const
int
MongoDB\Driver\ReadPreference::RP_PRIMARY_PREFERRED = 5;
const
int
MongoDB\Driver\ReadPreference::RP_SECONDARY = 2;
const
int
MongoDB\Driver\ReadPreference::RP_SECONDARY_PREFERRED = 6;
const
int
MongoDB\Driver\ReadPreference::RP_NEAREST = 10;
const
string
MongoDB\Driver\ReadPreference::PRIMARY = primary;
const
string
MongoDB\Driver\ReadPreference::PRIMARY_PREFERRED = primaryPreferred;
const
string
MongoDB\Driver\ReadPreference::SECONDARY = secondary;
const
string
MongoDB\Driver\ReadPreference::SECONDARY_PREFERRED = secondaryPreferred;
const
string
MongoDB\Driver\ReadPreference::NEAREST = nearest;
const
int
MongoDB\Driver\ReadPreference::NO_MAX_STALENESS = -1;
const
int
MongoDB\Driver\ReadPreference::SMALLEST_MAX_STALENESS_SECONDS = 90;
/* Methods */
final public stdClass bsonSerialize()
final public __construct(stringint
$mode , arraynull $tagSets = null , arraynull $options = null )final public objectnull getHedge()
final public int getMaxStalenessSeconds()
final public int getMode()
final public string getModeString()
final public array getTagSets()
final public string serialize()
final public void unserialize(string
}$data )Predefined Constants
Changelog
|