classredis::RedisBatch

sys::Obj
  redis::RedisBatch

RedisBatch builds a list of commands that can be run in batch using pipeline or multi.

del

Source

This del(Str key)

Delete the given key value.

expire

Source

This expire(Str key, Duration seconds)

Expire given key after given seconds has elasped, where timeout must be in even second intervals.

expireat

Source

This expireat(Str key, DateTime timestamp)

Expire given key when the given timestamp has been reached, where timestamp has a resolution of whole seconds.

get

Source

This get(Str key)

Get the value for given key.

incr

Source

This incr(Str key)

Increments the number stored at key by one. If the key does not exist, it is set to 0 before performing the operation. If px is non-null expire this key after the given timeout in milliseconds. Returns the value of the key after the increment.

incrby

Source

This incrby(Str key, Int delta)

Increments the number stored at key by delta. If the key does not exist, it is set to 0 before performing the operation. If px is non-null expire this key after the given timeout in milliseconds. Returns the value of the key after the increment.

incrbyfloat

Source

This incrbyfloat(Str key, Float delta)

Increment the string representing a floating point number stored at key by the specified delta. If the key does not exist, it is set to 0 before performing the operation. If px is non-null expire this key after the given timeout in milliseconds. Returns the value of the key after the increment.

pexpire

Source

This pexpire(Str key, Duration milliseconds)

Expire given key after given ms has elasped, where timeout must be in even millisecond intervals.

set

Source

This set(Str key, Obj? val, Duration? px := null)

Set the given key to value, if val is null this method deletes the given key (see del). If px is non-null expire this key after the given timeout in milliseconds.

setnx

Source

This setnx(Str key, Obj val, Duration? px := null)

Set the given key to value only if key does not exist. Returns true if set was succesfull, or false if set failed due to already existing key. If px is non-null expire this key after the given timeout in milliseconds.

size

Source

Int size()

Return number of commands in this batch.