Docs Home → MongoDB Manual
Mongo.getReadPrefTagSet()
Mongo.getReadPrefTagSet()
-
See Read Preference for an introduction to read preferences and tag sets in MongoDB. 有关MongoDB中读取首选项和标记集的介绍,请参阅读取首选项。Use getReadPrefTagSet()
to return the current read preference tag set, as in the following example:使用getReadPrefTagSet()
返回当前的读取首选项标记集,如下例所示:
db.getMongo().getReadPrefTagSet()
Use the following operation to return and print the current read preference tag set:使用以下操作返回并打印当前读取首选项标记集:
printjson(db.getMongo().getReadPrefTagSet());