🎉 Replace current uuidv1 with custom v8

This commit is contained in:
Andrey Antukh 2022-08-01 13:07:00 +02:00
parent abfca5c89a
commit fbfcb827ed
11 changed files with 212 additions and 105 deletions

View file

@ -33,4 +33,4 @@
{:src-dirs ["dev/java"]
:class-dir class-dir
:basis basis
:javac-opts ["-source" "11" "-target" "11"]}))
:javac-opts ["-source" "17" "-target" "17"]}))

View file

@ -10,6 +10,7 @@
com.github.luben/zstd-jni {:mvn/version "1.5.2-3"}
org.clojure/data.fressian {:mvn/version "1.0.0"}
io.prometheus/simpleclient {:mvn/version "0.15.0"}
io.prometheus/simpleclient_hotspot {:mvn/version "0.15.0"}
io.prometheus/simpleclient_jetty {:mvn/version "0.15.0"

View file

@ -34,7 +34,9 @@
[mockery.core :as mk]
[promesa.core :as p]
[yetti.request :as yrq])
(:import org.postgresql.ds.PGSimpleDataSource))
(:import
java.util.UUID
org.postgresql.ds.PGSimpleDataSource))
(def ^:dynamic *system* nil)
(def ^:dynamic *pool* nil)
@ -128,8 +130,8 @@
(defn mk-uuid
[prefix & args]
(uuid/namespaced uuid/zero (apply str prefix args)))
(UUID/nameUUIDFromBytes (-> (apply str prefix args)
(.getBytes "UTF-8"))))
;; --- FACTORIES
(defn create-profile*