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
(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.
buf
(Fn [(Ref RedisPipeline a)] (Ref StringBuf a))
gets the buf property of a RedisPipeline.
count
(Fn [(Ref RedisPipeline a)] (Ref Int a))
gets the count property of a RedisPipeline.
delete
(Fn [RedisPipeline] ())
deletes a RedisPipeline. Should usually not be called manually.
set-buf
(Fn [RedisPipeline, StringBuf] RedisPipeline)
sets the buf property of a RedisPipeline.
set-buf!
(Fn [(Ref RedisPipeline a), StringBuf] ())
sets the buf property of a RedisPipeline in place.
set-count
(Fn [RedisPipeline, Int] RedisPipeline)
sets the count property of a RedisPipeline.
set-count!
(Fn [(Ref RedisPipeline a), Int] ())
sets the count property of a RedisPipeline in place.
transaction-str
(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
(Fn [RedisPipeline, (Ref (Fn [StringBuf] StringBuf a) b)] RedisPipeline)
updates the buf property of a RedisPipeline using a function f.
update-count
(Fn [RedisPipeline, (Ref (Fn [Int] Int a) b)] RedisPipeline)
updates the count property of a RedisPipeline using a function f.