Provides reference types that refer to clojure data potentially off-heap or remotely.
e.g (let [dref (dref/persist "file:///Users/foobar/objects" 42 {:as "edn"})] @dref ;; derefable (dref/reference (uri dref)) ;; reobtain the reference from a URI (dref/value (uri dref)) ;; alternative deref operator, takes a URI (and additional options) )
Reference identity is a URI, the scheme of which determines the type. e.g volatile: mutable, non-cached value: immutable, cached & interned while references exist.
The subscheme determines the storage implementation e.g file: File system storage mem: Transient memory storage
Further storages can be found in the scheme
package.
Extend to new schemes via the multimethods read-bytes
write-bytes!
and `delete-bytes!.
The file extension of the uri determines the storage format. e.g edn edn.zip
Further formats can be found inthe format
package.
Extend to new formats via the multimethods serialize
and deserialize
.
You can deref via value
a URI, (or string uri), or a reference object obtained with reference
.
Example URI's:
volatile:mem://foo/bar/baz.edn
value:file:///Users/foobar/objects/f79975f99908e5387fca3b503d9e9adbefaafc5e.edn.zip
Provides reference types that refer to clojure data potentially off-heap or remotely. e.g (let [dref (dref/persist "file:///Users/foobar/objects" 42 {:as "edn"})] @dref ;; derefable (dref/reference (uri dref)) ;; reobtain the reference from a URI (dref/value (uri dref)) ;; alternative deref operator, takes a URI (and additional options) ) Reference identity is a URI, the scheme of which determines the type. e.g volatile: mutable, non-cached value: immutable, cached & interned while references exist. The subscheme determines the storage implementation e.g file: File system storage mem: Transient memory storage Further storages can be found in the `scheme` package. Extend to new schemes via the multimethods `read-bytes` `write-bytes!` and `delete-bytes!. The file extension of the uri determines the storage format. e.g edn edn.zip Further formats can be found inthe `format` package. Extend to new formats via the multimethods `serialize` and `deserialize`. You can deref via `value` a URI, (or string uri), or a reference object obtained with `reference`. Example URI's: `volatile:mem://foo/bar/baz.edn` `value:file:///Users/foobar/objects/f79975f99908e5387fca3b503d9e9adbefaafc5e.edn.zip`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close