翻译或纠错本页面

Mongo.getReadPrefTagSet()

Mongo.getReadPrefTagSet()
返回:The current read preference tag set for the Mongo() connection object.

See 复制集读选项 for an introduction to read preferences and tag sets in MongoDB. Use getReadPrefTagSet() to return the current read preference tag set, as in the following example:

db.getMongo().getReadPrefTagSet()

Use the following operation to return and print the current read preference tag set:

printjson(db.getMongo().getReadPrefTagSet());

参见

复制集读选项, readPref(), setReadPref(), and getReadPrefTagSet().