RedisPipeline

is a batch of commands accumulated in memory and sent in a single write, either as a plain pipeline with pipeline-exec or as a transaction with transaction-exec. The with-pipeline and with-transaction macros build and run one for you; begin and add are there for when the set of commands is not known until runtime.

add

defn

(Fn [(Ref RedisPipeline a), String, (Ref (Array RESP) b)] ())

                        (add p cmd args)
                    

adds a command to the pipeline.

The command name must use spaces to separate sub-commands (e.g. @"CLIENT ID", not @"client-id"). The with-pipeline macro converts hyphens to spaces automatically, but add does not.

begin

defn

(Fn [] RedisPipeline)

                        (begin)
                    

creates a new empty pipeline.

buf

instantiate

(Fn [(Ref RedisPipeline a)] (Ref StringBuf a))

gets the buf property of a RedisPipeline.

copy

instantiate

(Fn [(Ref RedisPipeline a)] RedisPipeline)

copies a RedisPipeline.

count

instantiate

(Fn [(Ref RedisPipeline a)] (Ref Int a))

gets the count property of a RedisPipeline.

delete

instantiate

(Fn [RedisPipeline] ())

deletes a RedisPipeline. Should usually not be called manually.

init

instantiate

(Fn [StringBuf, Int] RedisPipeline)

creates a RedisPipeline.

prn

instantiate

(Fn [(Ref RedisPipeline a)] String)

converts a RedisPipeline to a string.

set-buf

instantiate

(Fn [RedisPipeline, StringBuf] RedisPipeline)

sets the buf property of a RedisPipeline.

set-buf!

instantiate

(Fn [(Ref RedisPipeline a), StringBuf] ())

sets the buf property of a RedisPipeline in place.

set-count

instantiate

(Fn [RedisPipeline, Int] RedisPipeline)

sets the count property of a RedisPipeline.

set-count!

instantiate

(Fn [(Ref RedisPipeline a), Int] ())

sets the count property of a RedisPipeline in place.

str

instantiate

(Fn [(Ref RedisPipeline a)] String)

converts a RedisPipeline to a string.

transaction-str

defn

(Fn [(Ref RedisPipeline a)] String)

                        (transaction-str p)
                    

the wire bytes that run the batch as one transaction: MULTI, every added command, then EXEC.

update-buf

instantiate

(Fn [RedisPipeline, (Ref (Fn [StringBuf] StringBuf a) b)] RedisPipeline)

updates the buf property of a RedisPipeline using a function f.

update-count

instantiate

(Fn [RedisPipeline, (Ref (Fn [Int] Int a) b)] RedisPipeline)

updates the count property of a RedisPipeline using a function f.