Make monger.core/mongo-options fully up-to-date with the Java driver 2.10.1
This commit is contained in:
parent
e8e9147e85
commit
3a2afd0cec
1 changed files with 7 additions and 11 deletions
|
|
@ -134,7 +134,7 @@
|
||||||
(defn mongo-options
|
(defn mongo-options
|
||||||
[& { :keys [connections-per-host threads-allowed-to-block-for-connection-multiplier
|
[& { :keys [connections-per-host threads-allowed-to-block-for-connection-multiplier
|
||||||
max-wait-time connect-timeout socket-timeout socket-keep-alive auto-connect-retry max-auto-connect-retry-time
|
max-wait-time connect-timeout socket-timeout socket-keep-alive auto-connect-retry max-auto-connect-retry-time
|
||||||
safe w w-timeout fsync j] :or [auto-connect-retry true] }]
|
description write-concern cursor-finalizer-enabled] :or [auto-connect-retry true] }]
|
||||||
(let [mob (MongoClientOptions$Builder.)]
|
(let [mob (MongoClientOptions$Builder.)]
|
||||||
(when connections-per-host
|
(when connections-per-host
|
||||||
(.connectionsPerHost mob connections-per-host))
|
(.connectionsPerHost mob connections-per-host))
|
||||||
|
|
@ -152,16 +152,12 @@
|
||||||
(.autoConnectRetry mob auto-connect-retry))
|
(.autoConnectRetry mob auto-connect-retry))
|
||||||
(when max-auto-connect-retry-time
|
(when max-auto-connect-retry-time
|
||||||
(.maxAutoConnectRetryTime mob max-auto-connect-retry-time))
|
(.maxAutoConnectRetryTime mob max-auto-connect-retry-time))
|
||||||
(when safe
|
(when description
|
||||||
(.safe mob safe))
|
(.description mob description))
|
||||||
(when w
|
(when write-concern
|
||||||
(.w mob w))
|
(.writeConcern mob write-concern))
|
||||||
(when w-timeout
|
(when cursor-finalizer-enabled
|
||||||
(.wtimeout mob w-timeout))
|
(.cursorFinalizerEnabled mob cursor-finalizer-enabled))
|
||||||
(when j
|
|
||||||
(.j mob j))
|
|
||||||
(when fsync
|
|
||||||
(.fsync mob fsync))
|
|
||||||
(.build mob)))
|
(.build mob)))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue