A default Fressian-based implementation of d/ISessionSerializer.
Note! Currently this only supports the clara.rules.memory.PersistentLocalMemory implementation of memory.
A default Fressian-based implementation of d/ISessionSerializer. Note! Currently this only supports the clara.rules.memory.PersistentLocalMemory implementation of memory.
(create-session-serializer in-or-out-stream)
(create-session-serializer in-stream out-stream)
Inputs: ([in-or-out-stream :- (s/pred (some-fn (fn* [p1__26295#] (instance? InputStream p1__26295#)) (fn* [p1__26296#] (instance? OutputStream p1__26296#))) "java.io.InputStream or java.io.OutputStream")] [in-stream :- (s/maybe InputStream) out-stream :- (s/maybe OutputStream)])
Creates an instance of FressianSessionSerializer which implements d/ISessionSerializer by using Fressian serialization for the session structures.
In the one arity case, takes either an input stream or an output stream. This arity is intended for creating a Fressian serializer instance that will only be used for serialization or deserialization, but not both. e.g. This is often convenient if serialization and deserialization are not done from the same process. If it is to be used for serialization, then the stream given should be an output stream. If it is to be used for deserialization, then the stream to be given should be an input stream.
In the two arity case, takes an input stream and an output stream. These will be used for deserialization and serialization within the created Fressian serializer instance, respectively.
Note! Currently this only supports the clara.rules.memory.PersistentLocalMemory implementation of memory.
Inputs: ([in-or-out-stream :- (s/pred (some-fn (fn* [p1__26295#] (instance? InputStream p1__26295#)) (fn* [p1__26296#] (instance? OutputStream p1__26296#))) "java.io.InputStream or java.io.OutputStream")] [in-stream :- (s/maybe InputStream) out-stream :- (s/maybe OutputStream)]) Creates an instance of FressianSessionSerializer which implements d/ISessionSerializer by using Fressian serialization for the session structures. In the one arity case, takes either an input stream or an output stream. This arity is intended for creating a Fressian serializer instance that will only be used for serialization or deserialization, but not both. e.g. This is often convenient if serialization and deserialization are not done from the same process. If it is to be used for serialization, then the stream given should be an output stream. If it is to be used for deserialization, then the stream to be given should be an input stream. In the two arity case, takes an input stream and an output stream. These will be used for deserialization and serialization within the created Fressian serializer instance, respectively. Note! Currently this only supports the clara.rules.memory.PersistentLocalMemory implementation of memory.
A structure tying together the custom Fressian write and read handlers used by FressianSessionSerializer's.
A structure tying together the custom Fressian write and read handlers used by FressianSessionSerializer's.
All Fressian read handlers used by FressianSessionSerializer's.
All Fressian read handlers used by FressianSessionSerializer's.
(read-record rdr)
(read-record rdr add-fn)
Same as read-with-meta, but with Clojure record support. The type of the record will be preserved.
Same as read-with-meta, but with Clojure record support. The type of the record will be preserved.
(read-with-meta rdr build-fn)
Reads an object from the reader that was written via write-with-meta. If the object was written with metadata the metadata will be associated on the object returned.
Reads an object from the reader that was written via write-with-meta. If the object was written with metadata the metadata will be associated on the object returned.
(record-map-constructor-name rec)
Return the 'map->' prefix, factory constructor function for a Clojure record.
Return the 'map->' prefix, factory constructor function for a Clojure record.
All Fressian write handlers used by FressianSessionSerializer's.
All Fressian write handlers used by FressianSessionSerializer's.
(write-map w m)
Writes a map as Fressian with the tag 'map' and all keys cached.
Writes a map as Fressian with the tag 'map' and all keys cached.
(write-record w tag rec)
Same as write-with-meta, but with Clojure record support. The type of the record will be preserved.
Same as write-with-meta, but with Clojure record support. The type of the record will be preserved.
(write-with-meta w tag o)
(write-with-meta w tag o write-fn)
Writes the object to the writer under the given tag. If the record has metadata, the metadata will also be written. read-with-meta will associated this metadata back with the object when reading.
Writes the object to the writer under the given tag. If the record has metadata, the metadata will also be written. read-with-meta will associated this metadata back with the object when reading.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close