MongoLink`
MongoLink`

MongoWriteConcernCreate

MongoWriteConcernCreate[]

creates an immutable MongoWriteConcern object.

MongoWriteConcernCreate[w]

creates a MongoWriteConcern object with acknowledgement level w.

Details and Options

  • To use MongoWriteConcernCreate, you first need to load MongoLink using Needs["MongoLink`"].
  • w is an integer greater than or equal to 0. Used with replication, write operations will block until they have been replicated to the specified number or tagged set of servers. w always includes the replica set primary (e.g. w=3 means write to the primary and wait until replicated to two secondaries).
  • w with a value of 0 disables acknowledgement of write operations and can not be used with other write concern options.
  • w=0 disables acknowledgement of write operations and can not be used with other write concern options.
  • The following options are supported:
  • "Journal"TrueBlock until write operations have been committed to the journal.
    "Timeout"NoneA value in milliseconds to control how long to wait for write propagation to complete.
  • Prior to MongoDB 2.6, the option "Journal" was ignored if the server was running without journaling. Starting with MongoDB 2.6 write operations will fail with an exception if this option is used when the server is running without journaling.
  • The option "Timeout" is used in conjunction with w. Specify a value in milliseconds to control how long to wait for write propagation to complete. If replication does not complete in the given timeframe, a timeout exception is raised.
  • See the MongoDB write concern documentation for more information.

Examples

Basic Examples  (2)

Create a MongoWriteConcern object:

Create a MongoWriteConcern object with acknowledgement of write operations disabled:

Wolfram Research (2018), MongoWriteConcernCreate, Wolfram Language function, https://reference.wolfram.com/language/MongoLink/ref/MongoWriteConcernCreate.html.

Text

Wolfram Research (2018), MongoWriteConcernCreate, Wolfram Language function, https://reference.wolfram.com/language/MongoLink/ref/MongoWriteConcernCreate.html.

CMS

Wolfram Language. 2018. "MongoWriteConcernCreate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/MongoLink/ref/MongoWriteConcernCreate.html.

APA

Wolfram Language. (2018). MongoWriteConcernCreate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/MongoLink/ref/MongoWriteConcernCreate.html

BibTeX

@misc{reference.wolfram_2024_mongowriteconcerncreate, author="Wolfram Research", title="{MongoWriteConcernCreate}", year="2018", howpublished="\url{https://reference.wolfram.com/language/MongoLink/ref/MongoWriteConcernCreate.html}", note=[Accessed: 05-October-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_mongowriteconcerncreate, organization={Wolfram Research}, title={MongoWriteConcernCreate}, year={2018}, url={https://reference.wolfram.com/language/MongoLink/ref/MongoWriteConcernCreate.html}, note=[Accessed: 05-October-2024 ]}