Docs Menu

Mongo.getReadPrefMode()

項目一覧

Mongo.getReadPrefMode()
次の値を返します。The current 読み込み設定 (read preference) mode for the Mongo() connection object.

See 読み込み設定 (read preference) for an introduction to read preferences in MongoDB. Use getReadPrefMode() to return the current read preference mode, as in the following example:

db.getMongo().getReadPrefMode()

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

print(db.getMongo().getReadPrefMode());

This operation will return one of the following read preference modes:

このメソッドは、次の環境でホストされている配置で使用できます。

  • MongoDB Atlas はクラウドでの MongoDB 配置のためのフルマネージド サービスです

  • MongoDB Enterprise: サブスクリプションベースの自己管理型 MongoDB バージョン

  • MongoDB Community: ソースが利用可能で、無料で使用できる自己管理型の MongoDB のバージョン

以下も参照してください。

項目一覧