SYNOPSIS
bool mongoc_write_concern_get_fsync (const mongoc_write_concern_t *write_concern); void mongoc_write_concern_set_fsync (mongoc_write_concern_t *write_concern, bool fsync_); bool mongoc_write_concern_get_journal (const mongoc_write_concern_t *write_concern); void mongoc_write_concern_set_journal (mongoc_write_concern_t *write_concern, bool journal); int32_t mongoc_write_concern_get_w (const mongoc_write_concern_t *write_concern); void mongoc_write_concern_set_w (mongoc_write_concern_t *write_concern, int32_t w); int32_t mongoc_write_concern_get_wtimeout (const mongoc_write_concern_t *write_concern); void mongoc_write_concern_set_wtimeout (mongoc_write_concern_t *write_concern, int32_t wtimeout_msec); bool mongoc_write_concern_get_wmajority (const mongoc_write_concern_t *write_concern); void mongoc_write_concern_set_wmajority (mongoc_write_concern_t *write_concern, int32_t wtimeout_msec);
DESCRIPTION
The mongoc_write_concern_get() functions shall return values from the write_concern.
The mongoc_write_concern_set() functions set attributes from the write_concern.
For more on valid values for w, see mongoc_write_concern(7).
wtimeout_msec is the timeout, in milliseconds, for write acknowledgments.
FSYNC
The fsync attribute has special meaning to the MongoDB server. The fysnc attribute is deprecated, but for those using it, please follow the following guidelines.
-
fsync is identical to journal if MongoDB is running with a journal.
-
fsync requests that the write be fsync()'d to disk only if mongod is not running with a journal.
-
fsync cannot be used simultaneously with the journal flag.
RETURN VALUE
The mongoc_write_concern_get() functions returns appropriate read only types.
The mongoc_write_concern_set() functions set their attribute.
ERRORS
No errors are defined.
SEE ALSO
AUTHORS
This page was written by MongoDB Inc.