Class: Valkey::Pipeline

Inherits:
Object
  • Object
show all
Includes:
Commands
Defined in:
lib/valkey/pipeline.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Commands::SortedSetCommands

#zadd, #zcard, #zincrby, #zrank, #zrem, #zrevrank, #zscore

Methods included from Commands::HyperLogLogCommands

#pfadd, #pfcount, #pfmerge

Methods included from Commands::GeoCommands

#geoadd, #geodist, #geohash, #geopos, #geosearch, #geosearchstore

Methods included from Commands::ListCommands

#blmove, #blmpop, #blpop, #brpop, #brpoplpush, #lindex, #linsert, #llen, #lmove, #lmpop, #lpop, #lpush, #lpushx, #lrange, #lrem, #lset, #ltrim, #rpop, #rpoplpush, #rpush, #rpushx

Methods included from Commands::BitmapCommands

#bitcount, #bitfield, #bitfield_ro, #bitop, #bitpos, #getbit, #setbit

Methods included from Commands::GenericCommands

#_scan, #copy, #del, #dump, #exists, #exists?, #expire, #expireat, #expiretime, #move, #object, #persist, #pexpire, #pexpireat, #pexpiretime, #pttl, #randomkey, #rename, #renamenx, #restore, #scan, #sort, #touch, #ttl, #type, #unlink, #wait, #waitof

Methods included from Commands::ServerCommands

#bgrewriteaof, #bgsave, #client, #config, #dbsize, #debug, #flushall, #flushdb, #info, #lastsave, #monitor, #save, #shutdown, #slaveof, #slowlog, #sync, #time

Methods included from Commands::ConnectionCommands

#auth, #echo, #ping, #quit, #select

Methods included from Commands::StringCommands

#append, #decr, #decrby, #get, #getdel, #getex, #getrange, #getset, #incr, #incrby, #incrbyfloat, #lcs, #mapped_mget, #mapped_mset, #mapped_msetnx, #mget, #mset, #msetnx, #psetex, #set, #setex, #setnx, #setrange, #strlen

Constructor Details

#initializePipeline

Returns a new instance of Pipeline.



9
10
11
# File 'lib/valkey/pipeline.rb', line 9

def initialize
  @commands = []
end

Instance Attribute Details

#commandsObject (readonly)

Returns the value of attribute commands.



7
8
9
# File 'lib/valkey/pipeline.rb', line 7

def commands
  @commands
end

Instance Method Details

#send_command(command_type, command_args = [], &block) ⇒ Object



13
14
15
# File 'lib/valkey/pipeline.rb', line 13

def send_command(command_type, command_args = [], &block)
  @commands << [command_type, command_args, block]
end