From 3a2afd0cece6b578c7ca5fd688ee066088826e8e Mon Sep 17 00:00:00 2001 From: Michael Klishin Date: Mon, 18 Mar 2013 19:32:03 +0400 Subject: [PATCH] Make monger.core/mongo-options fully up-to-date with the Java driver 2.10.1 --- src/clojure/monger/core.clj | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/clojure/monger/core.clj b/src/clojure/monger/core.clj index fa5f8f6..6e5b704 100644 --- a/src/clojure/monger/core.clj +++ b/src/clojure/monger/core.clj @@ -134,7 +134,7 @@ (defn mongo-options [& { :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 - 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.)] (when connections-per-host (.connectionsPerHost mob connections-per-host)) @@ -152,16 +152,12 @@ (.autoConnectRetry mob auto-connect-retry)) (when max-auto-connect-retry-time (.maxAutoConnectRetryTime mob max-auto-connect-retry-time)) - (when safe - (.safe mob safe)) - (when w - (.w mob w)) - (when w-timeout - (.wtimeout mob w-timeout)) - (when j - (.j mob j)) - (when fsync - (.fsync mob fsync)) + (when description + (.description mob description)) + (when write-concern + (.writeConcern mob write-concern)) + (when cursor-finalizer-enabled + (.cursorFinalizerEnabled mob cursor-finalizer-enabled)) (.build mob)))