MongoDB C++ Driver mongocxx-4.0.0
|
#include <mongocxx/v_noabi/mongocxx/options/index_view.hpp>
Class representing optional arguments to IndexView operations.
Public Member Functions | |
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::value > | commit_quorum () const |
Gets the current commitQuorum setting. | |
index_view & | commit_quorum (std::int32_t commit_quorum) |
Sets the commit quorum for this operation. | |
index_view & | commit_quorum (std::string commit_quorum) |
Sets the commit quorum for this operation. | |
const bsoncxx::v_noabi::stdx::optional< std::chrono::milliseconds > & | max_time () const |
The current max_time setting. | |
index_view & | max_time (std::chrono::milliseconds max_time) |
Sets the maximum amount of time for this operation to run (server-side) in milliseconds. | |
const bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::write_concern > & | write_concern () const |
Gets the current write concern. | |
index_view & | write_concern (mongocxx::v_noabi::write_concern write_concern) |
Sets the write concern for this operation. | |
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::value > mongocxx::v_noabi::options::index_view::commit_quorum | ( | ) | const |
Gets the current commitQuorum setting.
This option may only be used with MongoDB version 4.4 or later.
index_view & mongocxx::v_noabi::options::index_view::commit_quorum | ( | std::int32_t | commit_quorum | ) |
Sets the commit quorum for this operation.
This option may only be used with MongoDB version 4.4 or later.
commit_quorum | Integer representing the minimum number of data-bearing voting replica set members (i.e. commit quorum), including the primary, that must report a successful index build before the primary marks the indexes as ready. A value of 0 disables quorum-voting behavior. |
index_view & mongocxx::v_noabi::options::index_view::commit_quorum | ( | std::string | commit_quorum | ) |
Sets the commit quorum for this operation.
This option may only be used with MongoDB version 4.4 or later.
commit_quorum | String representing the minimum number of data-bearing voting replica set members (i.e. commit quorum), including the primary, that must report a successful index build before the primary marks the indexes as ready. |
const bsoncxx::v_noabi::stdx::optional< std::chrono::milliseconds > & mongocxx::v_noabi::options::index_view::max_time | ( | ) | const |
The current max_time setting.
index_view & mongocxx::v_noabi::options::index_view::max_time | ( | std::chrono::milliseconds | max_time | ) |
Sets the maximum amount of time for this operation to run (server-side) in milliseconds.
max_time | The max amount of time (in milliseconds). |
const bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::write_concern > & mongocxx::v_noabi::options::index_view::write_concern | ( | ) | const |
Gets the current write concern.
index_view & mongocxx::v_noabi::options::index_view::write_concern | ( | mongocxx::v_noabi::write_concern | write_concern | ) |
Sets the write concern for this operation.
write_concern | Object representing the write concern. |