Class RespCommand
java.lang.Object
org.infinispan.server.resp.RespCommand
- All Implemented Interfaces:
BaseResp3Command
- Direct Known Subclasses:
AbstractBlockingPop,AGGCommand,APPEND,AUTH,BaseIterationCommand,CLIENT,COMMAND,CONFIG,DBSIZE,DECR,DECRBY,DEL,DIFF,DISCARD,ECHO,EVAL,EXEC,EXISTS,EXISTS,EXPIRE,FamilyCommand,FLUSH,FLUSHDB,GET,GETDEL,GETEX,GETRANGE,HDEL,HELLO,HEXISTS,HGET,HGETALL,HINCRBY,HINCRBYFLOAT,HKEYS,HLEN,HMGET,HMSET,HRANDFIELD,HSETNX,HSTRLEN,HVALS,INCR,INCRBY,INCRBYFLOAT,INFO,JSONAPPEND,JSONARRINDEX,JSONARRINSERT,JSONARRPOP,JSONARRTRIM,JSONCLEAR,JSONDEL,JSONGET,JSONLEN,JSONMERGE,JSONMGET,JSONMSET,JSONNUMINCRBY,JSONNUMMULTBY,JSONOBJKEYS,JSONRESP,JSONSET,JSONTOGGLE,JSONTYPE,KEYSLOT,LCS,LINDEX,LINSERT,LLEN,LMOVE,LMPOP,LOAD,LPOS,LRANGE,LREM,LSET,LTRIM,MEMORY,MGET,MODULE,MSET,MSETNX,MULTI,NODES,PERSIST,PFADD,PING,POP,POP,PSUBSCRIBE,PUBLISH,PUNSUBSCRIBE,PUSH,QUIT,RANDOMKEY,READONLY,READWRITE,RENAME,RENAMENX,RESET,SADD,SCARD,SDIFF,SDIFFSTORE,SELECT,SET,SETNX,SETRANGE,SHARDS,SINTER,SINTERCARD,SINTERSTORE,SISMEMBER,SLOTS,SMEMBERS,SMISMEMBER,SMOVE,SORT,SORT_RO,SPOP,SRANDMEMBER,SREM,STRALGO,STRLEN,SUBSCRIBE,SUNION,SUNIONSTORE,TIME,TOUCH,TTL,TYPE,UNSUBSCRIBE,UNWATCH,WATCH,ZADD,ZCARD,ZCOUNT,ZINCRBY,ZINTERCARD,ZLEXCOUNT,ZMPOP,ZMSCORE,ZRANDMEMBER,ZRANGE,ZRANK,ZREM,ZREMRANGE,ZSCORE
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRespCommand(int arity, int firstKeyPos, int lastKeyPos, int steps) protectedRespCommand(String name, int arity, int firstKeyPos, int lastKeyPos, int steps) -
Method Summary
Modifier and TypeMethodDescriptionbyte[][]extractKeys(List<byte[]> arguments) static RespCommandfromByteBuf(io.netty.buffer.ByteBuf buf, int commandLength) static RespCommandfromString(String s) intgetArity()intintgetName()intgetSteps()handleException(RespRequestHandler handler, Throwable t) booleanhasValidNumberOfArguments(List<byte[]> arguments) final booleanmatch(byte[] other) inttoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.server.resp.commands.BaseResp3Command
aclMask
-
Field Details
-
log
-
-
Constructor Details
-
RespCommand
protected RespCommand(int arity, int firstKeyPos, int lastKeyPos, int steps) - Parameters:
arity- the number of argumentsfirstKeyPos- the position of the command's first key name argument. For most commands, the first key's position is 1. Position 0 is always the command name itself.lastKeyPos- the position of the command's last key name argument. Redis commands usually accept one, two or multiple number of keys. Commands that accept a single key have both first key and last key set to 1. Commands that accept two key name arguments, e.g. BRPOPLPUSH, SMOVE and RENAME, have this value set to the position of their second key. Multi-key commands that accept an arbitrary number of keys, such as MSET, use the value -1.steps- the step, or increment, between the first key and the position of the next key.
-
RespCommand
- Parameters:
name- the name of the commandarity- the number of argumentsfirstKeyPos- the position of the command's first key name argument. For most commands, the first key's position is 1. Position 0 is always the command name itself.lastKeyPos- the position of the command's last key name argument. Redis commands usually accept one, two or multiple number of keys. Commands that accept a single key have both first key and last key set to 1. Commands that accept two key name arguments, e.g. BRPOPLPUSH, SMOVE and RENAME, have this value set to the position of their second key. Multi-key commands that accept an arbitrary number of keys, such as MSET, use the value -1.steps- the step, or increment, between the first key and the position of the next key.
-
-
Method Details
-
hasValidNumberOfArguments
-
handleException
-
getName
-
fromByteBuf
-
fromString
-
match
public final boolean match(byte[] other) -
size
-
getArity
public int getArity() -
getFirstKeyPos
public int getFirstKeyPos() -
getLastKeyPos
public int getLastKeyPos() -
getSteps
public int getSteps() -
extractKeys
-
toString
-