The MongoDB\Driver\ReadPreference class

(mongodb >=1.0.0)

소개

클래스 개요

final MongoDB\Driver\ReadPreference implements MongoDB\BSON\Serializable {
/* Constants */
const integer RP_PRIMARY = 1 ;
const integer RP_PRIMARY_PREFERRED = 5 ;
const integer RP_SECONDARY = 2 ;
const integer RP_SECONDARY_PREFERRED = 6 ;
const integer RP_NEAREST = 10 ;
/* 메소드 */
final public object bsonSerialize ( void )
final public __construct ( int $mode [, array $tagSets ] )
final public integer getMode ( void )
final public array getTagSets ( void )
}

예약 상수

MongoDB\Driver\ReadPreference::RP_PRIMARY

All operations read from the current replica set primary. This is the default read preference for MongoDB.

MongoDB\Driver\ReadPreference::RP_PRIMARY_PREFERRED

In most situations, operations read from the primary but if it is unavailable, operations read from secondary members.

MongoDB\Driver\ReadPreference::RP_SECONDARY

All operations read from the secondary members of the replica set.

MongoDB\Driver\ReadPreference::RP_SECONDARY_PREFERRED

In most situations, operations read from secondary members but if no secondary members are available, operations read from the primary.

MongoDB\Driver\ReadPreference::RP_NEAREST

Operations read from member of the replica set with the least network latency, irrespective of the member's type.

Table of Contents

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top