(+default-registry ??)
()
default registry for running procedure instances
default registry for running procedure instances
(add-instance name id instance)
(add-instance registry name id instance)
adds something to the registry
@(add-instance (cache/cache {}) "hello" :1 {:a 1}) => {"hello" {:1 {:a 1}}}
adds something to the registry @(add-instance (cache/cache {}) "hello" :1 {:a 1}) => {"hello" {:1 {:a 1}}}
(get-instance name id)
(get-instance registry name id)
lists all items in the registry
(-> (cache/cache {}) (add-instance "hello" :1 {:a 1}) (add-instance "hello" :2 {:b 1}) (get-instance "hello" :2)) => {:b 1}
lists all items in the registry (-> (cache/cache {}) (add-instance "hello" :1 {:a 1}) (add-instance "hello" :2 {:b 1}) (get-instance "hello" :2)) => {:b 1}
(kill name id)
(kill registry name id)
kills the running instance in the registry
(-> (cache/cache {}) (add-instance "hello" :1 {:thread (volatile! (future (Thread/sleep 100000)))}) (kill "hello" :1)) => true
kills the running instance in the registry (-> (cache/cache {}) (add-instance "hello" :1 {:thread (volatile! (future (Thread/sleep 100000)))}) (kill "hello" :1)) => true
(list-instances name)
(list-instances registry name)
lists all items in the registry
(-> (cache/cache {}) (add-instance "hello" :1 {:a 1}) (add-instance "hello" :2 {:b 1}) (list-instances "hello")) => [{:a 1} {:b 1}]
lists all items in the registry (-> (cache/cache {}) (add-instance "hello" :1 {:a 1}) (add-instance "hello" :2 {:b 1}) (list-instances "hello")) => [{:a 1} {:b 1}]
(remove-instance name id)
(remove-instance registry name id)
removes something from the registry
(-> (cache/cache {}) (add-instance "hello" :1 {:a 1}) (remove-instance "hello" :1) deref) => {}
removes something from the registry (-> (cache/cache {}) (add-instance "hello" :1 {:a 1}) (remove-instance "hello" :1) deref) => {}
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close