Skip to content

Commit

Permalink
Rename ->map to ->list
Browse files Browse the repository at this point in the history
  • Loading branch information
evg-tso committed Aug 22, 2023
1 parent 9229ca1 commit 6446c83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/main/clojure/aerospike_clj/client.clj
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,14 @@
(get-batch [_this batch-reads conf]
(let [op-future (p/deferred)
start-time (System/nanoTime)
batch-reads-arr (collections/->map #(map->batch-read % dbns) batch-reads)]
batch-reads-arr (collections/->list #(map->batch-read % dbns) batch-reads)]
(.get ^AerospikeClient client
^EventLoop (.next ^EventLoops el)
(AsyncBatchListListener. op-future)
^BatchPolicy (:policy conf)
batch-reads-arr)
(-> op-future
(p/then' #(collections/->map batch-record->map %) completion-executor)
(p/then' #(collections/->list batch-record->map %) completion-executor)
(p/then' (:transcoder conf identity))
(register-events client-events :read-batch nil start-time conf))))

Expand Down Expand Up @@ -385,7 +385,7 @@
^BatchPolicy policy
^List batch-list)
(-> op-future
(p/then' (comp transcoder #(collections/->map batch-record->map %)) completion-executor)
(p/then' (comp transcoder #(collections/->list batch-record->map %)) completion-executor)
(register-events client-events :batch-operate nil start-time conf))))


Expand Down
2 changes: 1 addition & 1 deletion src/main/clojure/aerospike_clj/collections.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(:import (java.util ArrayList Collection Collections List)
(java.util.function Consumer)))

(defn ->map
(defn ->list
"Returns a new [java.util.List] containing the result of applying `mapper-fn` to each item in `col`.
Returns an unmodifiable list.
*Note*: This will usually be faster than `(mapv mapper-fn col)` because:
Expand Down

0 comments on commit 6446c83

Please sign in to comment.