我在春天以下核心蒙戈选项配置:春天的MongoDB写的关注值
<mongo:mongo host="${db.hostname}" >
<mongo:options
connections-per-host="40"
threads-allowed-to-block-for-connection-multiplier="1500"
connect-timeout="15000"
auto-connect-retry="true"
socket-timeout="60000"
write-number="1"
write-fsync="false"/>
</mongo:mongo>
我想知道的是关于不同的写号的选项是关于写像没有关注,正常,安全等
我可以假设写入数量到writeconcern的映射如下?
NONE: -1
NORMAL: 0
SAFE: 1 (default)
FSYNC_SAFE: 2
REPLICAS_SAFE: 3
JOURNAL_SAFE: 4
MAJORITY: 5
下面的链接提供了很好的帮助来设定在春季蒙戈的选择,而不是写数值不够具体: How to configure MongoDB Java driver MongoOptions for production use?