MongoLink`
MongoLink`

MongoWriteConcernCreate

MongoWriteConcernCreate[]

creates an immutable MongoWriteConcern object.

MongoWriteConcernCreate[w]

creates a MongoWriteConcern object with acknowledgement level w.

更多信息和选项

  • 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.

范例

基本范例  (2)

Create a MongoWriteConcern object:

Create a MongoWriteConcern object with acknowledgement of write operations disabled:

Wolfram Research (2018),MongoWriteConcernCreate,Wolfram 语言函数,https://reference.wolfram.com/language/MongoLink/ref/MongoWriteConcernCreate.html.

文本

Wolfram Research (2018),MongoWriteConcernCreate,Wolfram 语言函数,https://reference.wolfram.com/language/MongoLink/ref/MongoWriteConcernCreate.html.

CMS

Wolfram 语言. 2018. "MongoWriteConcernCreate." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/MongoLink/ref/MongoWriteConcernCreate.html.

APA

Wolfram 语言. (2018). MongoWriteConcernCreate. Wolfram 语言与系统参考资料中心. 追溯自 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: 22-November-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: 22-November-2024 ]}