org.springframework.data.redis.core
Enum RedisCommand

java.lang.Object
  extended by java.lang.Enum<RedisCommand>
      extended by org.springframework.data.redis.core.RedisCommand
All Implemented Interfaces:
Serializable, Comparable<RedisCommand>

public enum RedisCommand
extends Enum<RedisCommand>

Since:
1.3
See Also:
command list: https://github.com/antirez/redis/blob/93e7a130fc9594e41ccfc996b5eca7626ae5356a/src/redis.c#L119

Enum Constant Summary
APPEND
           
AUTH
           
BGREWRITEAOF
           
BGSAVE
           
BITCOUNT
           
BITOP
           
BITPOS
           
BLPOP
           
BRPOP
           
BRPOPLPUSH
           
CLIENT_GETNAME
           
CLIENT_KILL
           
CLIENT_LIST
           
CLIENT_PAUSE
           
CLIENT_SETNAME
           
CONFIG_GET
           
CONFIG_RESETSTAT
           
CONFIG_REWRITE
           
CONFIG_SET
           
DBSIZE
           
DECR
           
DECRBY
           
DEL
           
DISCARD
           
DUMP
           
ECHO
           
EVAL
           
EVALSHA
           
EXEC
           
EXISTS
           
EXPIRE
           
EXPIREAT
           
FLUSHALL
           
FLUSHDB
           
GET
           
GETBIT
           
GETRANGE
           
GETSET
           
HDEL
           
HEXISTS
           
HGET
           
HGETALL
           
HINCBYFLOAT
           
HINCRBY
           
HKEYS
           
HLEN
           
HMGET
           
HMSET
           
HSCAN
           
HSET
           
HSETNX
           
HVALS
           
INCR
           
INCRBYFLOAT
           
INFO
           
KEYS
           
LASTSAVE
           
LINDEX
           
LINSERT
           
LLEN
           
LPOP
           
LPUSH
           
LPUSHX
           
LRANGE
           
LREM
           
LSET
           
LTRIM
           
MGET
           
MIGRATE
           
MONITOR
           
MOVE
           
MSET
           
MSETNX
           
MULTI
           
PERSIST
           
PEXPIRE
           
PEXPIREAT
           
PING
           
PSETEX
           
PSUBSCRIBE
           
PTTL
           
QUIT
           
RANAME
           
RANDOMKEY
           
RENAMENX
           
RESTORE
           
RPOP
           
RPOPLPUSH
           
RPUSH
           
RPUSHX
           
SADD
           
SAVE
           
SCAN
           
SCARD
           
SCRIPT_EXISTS
           
SCRIPT_FLUSH
           
SCRIPT_KILL
           
SCRIPT_LOAD
           
SDIFF
           
SDIFFSTORE
           
SELECT
           
SET
           
SETBIT
           
SETEX
           
SETNX
           
SETRANGE
           
SHUTDOWN
           
SINTER
           
SINTERSTORE
           
SISMEMBER
           
SLAVEOF
           
SLOWLOG
           
SMEMBERS
           
SMOVE
           
SORT
           
SPOP
           
SRANDMEMBER
           
SREM
           
SSCAN
           
STRLEN
           
SUBSCRIBE
           
SUNION
           
SUNIONSTORE
           
SYNC
           
TIME
           
TTL
           
TYPE
           
UNKNOWN
           
UNSUBSCRIBE
           
UNWATCH
           
WATCH
           
ZADD
           
ZCARD
           
ZCOUNT
           
ZINCRBY
           
ZINTERSTORE
           
ZRANGE
           
ZRANGEBYSCORE
           
ZRANK
           
ZREM
           
ZREMRANGEBYRANK
           
ZREMRANGEBYSCORE
           
ZREVRANGE
           
ZREVRANGEBYSCORE
           
ZREVRANK
           
ZSCAN
           
ZSCORE
           
ZUNIONSTORE
           
 
Method Summary
static RedisCommand failsafeCommandLookup(String key)
          Returns the command represented by the given key.
 boolean isRead()
           
 boolean isReadonly()
           
 boolean isRepresentedBy(String command)
          String.equalsIgnoreCase(String) compare the given string representation of command against the Enum.toString() representation of the command as well as its given alias.
 boolean isWrite()
           
 boolean requiresArguments()
           
 boolean requiresExactNumberOfArguments()
           
 void validateArgumentCount(int nrArguments)
          Validates given argument count against expected ones.
static RedisCommand valueOf(String name)
          Returns the enum constant of this type with the specified name.
static RedisCommand[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

APPEND

public static final RedisCommand APPEND

AUTH

public static final RedisCommand AUTH

BGREWRITEAOF

public static final RedisCommand BGREWRITEAOF

BGSAVE

public static final RedisCommand BGSAVE

BITCOUNT

public static final RedisCommand BITCOUNT

BITOP

public static final RedisCommand BITOP

BITPOS

public static final RedisCommand BITPOS

BLPOP

public static final RedisCommand BLPOP

BRPOP

public static final RedisCommand BRPOP

BRPOPLPUSH

public static final RedisCommand BRPOPLPUSH

CLIENT_KILL

public static final RedisCommand CLIENT_KILL

CLIENT_LIST

public static final RedisCommand CLIENT_LIST

CLIENT_GETNAME

public static final RedisCommand CLIENT_GETNAME

CLIENT_PAUSE

public static final RedisCommand CLIENT_PAUSE

CLIENT_SETNAME

public static final RedisCommand CLIENT_SETNAME

CONFIG_GET

public static final RedisCommand CONFIG_GET

CONFIG_REWRITE

public static final RedisCommand CONFIG_REWRITE

CONFIG_SET

public static final RedisCommand CONFIG_SET

CONFIG_RESETSTAT

public static final RedisCommand CONFIG_RESETSTAT

DBSIZE

public static final RedisCommand DBSIZE

DECR

public static final RedisCommand DECR

DECRBY

public static final RedisCommand DECRBY

DEL

public static final RedisCommand DEL

DISCARD

public static final RedisCommand DISCARD

DUMP

public static final RedisCommand DUMP

ECHO

public static final RedisCommand ECHO

EVAL

public static final RedisCommand EVAL

EVALSHA

public static final RedisCommand EVALSHA

EXEC

public static final RedisCommand EXEC

EXISTS

public static final RedisCommand EXISTS

EXPIRE

public static final RedisCommand EXPIRE

EXPIREAT

public static final RedisCommand EXPIREAT

FLUSHALL

public static final RedisCommand FLUSHALL

FLUSHDB

public static final RedisCommand FLUSHDB

GET

public static final RedisCommand GET

GETBIT

public static final RedisCommand GETBIT

GETRANGE

public static final RedisCommand GETRANGE

GETSET

public static final RedisCommand GETSET

HDEL

public static final RedisCommand HDEL

HEXISTS

public static final RedisCommand HEXISTS

HGET

public static final RedisCommand HGET

HGETALL

public static final RedisCommand HGETALL

HINCRBY

public static final RedisCommand HINCRBY

HINCBYFLOAT

public static final RedisCommand HINCBYFLOAT

HKEYS

public static final RedisCommand HKEYS

HLEN

public static final RedisCommand HLEN

HMGET

public static final RedisCommand HMGET

HMSET

public static final RedisCommand HMSET

HSET

public static final RedisCommand HSET

HSETNX

public static final RedisCommand HSETNX

HVALS

public static final RedisCommand HVALS

INCR

public static final RedisCommand INCR

INCRBYFLOAT

public static final RedisCommand INCRBYFLOAT

INFO

public static final RedisCommand INFO

KEYS

public static final RedisCommand KEYS

LASTSAVE

public static final RedisCommand LASTSAVE

LINDEX

public static final RedisCommand LINDEX

LINSERT

public static final RedisCommand LINSERT

LLEN

public static final RedisCommand LLEN

LPOP

public static final RedisCommand LPOP

LPUSH

public static final RedisCommand LPUSH

LPUSHX

public static final RedisCommand LPUSHX

LRANGE

public static final RedisCommand LRANGE

LREM

public static final RedisCommand LREM

LSET

public static final RedisCommand LSET

LTRIM

public static final RedisCommand LTRIM

MGET

public static final RedisCommand MGET

MIGRATE

public static final RedisCommand MIGRATE

MONITOR

public static final RedisCommand MONITOR

MOVE

public static final RedisCommand MOVE

MSET

public static final RedisCommand MSET

MSETNX

public static final RedisCommand MSETNX

MULTI

public static final RedisCommand MULTI

PERSIST

public static final RedisCommand PERSIST

PEXPIRE

public static final RedisCommand PEXPIRE

PEXPIREAT

public static final RedisCommand PEXPIREAT

PING

public static final RedisCommand PING

PSETEX

public static final RedisCommand PSETEX

PSUBSCRIBE

public static final RedisCommand PSUBSCRIBE

PTTL

public static final RedisCommand PTTL

QUIT

public static final RedisCommand QUIT

RANDOMKEY

public static final RedisCommand RANDOMKEY

RANAME

public static final RedisCommand RANAME

RENAMENX

public static final RedisCommand RENAMENX

RESTORE

public static final RedisCommand RESTORE

RPOP

public static final RedisCommand RPOP

RPOPLPUSH

public static final RedisCommand RPOPLPUSH

RPUSH

public static final RedisCommand RPUSH

RPUSHX

public static final RedisCommand RPUSHX

SADD

public static final RedisCommand SADD

SAVE

public static final RedisCommand SAVE

SCARD

public static final RedisCommand SCARD

SCRIPT_EXISTS

public static final RedisCommand SCRIPT_EXISTS

SCRIPT_FLUSH

public static final RedisCommand SCRIPT_FLUSH

SCRIPT_KILL

public static final RedisCommand SCRIPT_KILL

SCRIPT_LOAD

public static final RedisCommand SCRIPT_LOAD

SDIFF

public static final RedisCommand SDIFF

SDIFFSTORE

public static final RedisCommand SDIFFSTORE

SELECT

public static final RedisCommand SELECT

SET

public static final RedisCommand SET

SETBIT

public static final RedisCommand SETBIT

SETEX

public static final RedisCommand SETEX

SETNX

public static final RedisCommand SETNX

SETRANGE

public static final RedisCommand SETRANGE

SHUTDOWN

public static final RedisCommand SHUTDOWN

SINTER

public static final RedisCommand SINTER

SINTERSTORE

public static final RedisCommand SINTERSTORE

SISMEMBER

public static final RedisCommand SISMEMBER

SLAVEOF

public static final RedisCommand SLAVEOF

SLOWLOG

public static final RedisCommand SLOWLOG

SMEMBERS

public static final RedisCommand SMEMBERS

SMOVE

public static final RedisCommand SMOVE

SORT

public static final RedisCommand SORT

SPOP

public static final RedisCommand SPOP

SRANDMEMBER

public static final RedisCommand SRANDMEMBER

SREM

public static final RedisCommand SREM

STRLEN

public static final RedisCommand STRLEN

SUBSCRIBE

public static final RedisCommand SUBSCRIBE

SUNION

public static final RedisCommand SUNION

SUNIONSTORE

public static final RedisCommand SUNIONSTORE

SYNC

public static final RedisCommand SYNC

TIME

public static final RedisCommand TIME

TTL

public static final RedisCommand TTL

TYPE

public static final RedisCommand TYPE

UNSUBSCRIBE

public static final RedisCommand UNSUBSCRIBE

UNWATCH

public static final RedisCommand UNWATCH

WATCH

public static final RedisCommand WATCH

ZADD

public static final RedisCommand ZADD

ZCARD

public static final RedisCommand ZCARD

ZCOUNT

public static final RedisCommand ZCOUNT

ZINCRBY

public static final RedisCommand ZINCRBY

ZINTERSTORE

public static final RedisCommand ZINTERSTORE

ZRANGE

public static final RedisCommand ZRANGE

ZRANGEBYSCORE

public static final RedisCommand ZRANGEBYSCORE

ZRANK

public static final RedisCommand ZRANK

ZREM

public static final RedisCommand ZREM

ZREMRANGEBYRANK

public static final RedisCommand ZREMRANGEBYRANK

ZREMRANGEBYSCORE

public static final RedisCommand ZREMRANGEBYSCORE

ZREVRANGE

public static final RedisCommand ZREVRANGE

ZREVRANGEBYSCORE

public static final RedisCommand ZREVRANGEBYSCORE

ZREVRANK

public static final RedisCommand ZREVRANK

ZSCORE

public static final RedisCommand ZSCORE

ZUNIONSTORE

public static final RedisCommand ZUNIONSTORE

SCAN

public static final RedisCommand SCAN

SSCAN

public static final RedisCommand SSCAN

HSCAN

public static final RedisCommand HSCAN

ZSCAN

public static final RedisCommand ZSCAN

UNKNOWN

public static final RedisCommand UNKNOWN
Method Detail

values

public static RedisCommand[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (RedisCommand c : RedisCommand.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static RedisCommand valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

requiresArguments

public boolean requiresArguments()
Returns:
true if the command requires arguments

requiresExactNumberOfArguments

public boolean requiresExactNumberOfArguments()
Returns:
true if an exact number of arguments is expected

isRead

public boolean isRead()
Returns:
true if the command triggers a read operation

isWrite

public boolean isWrite()
Returns:
true if the command triggers a write operation

isReadonly

public boolean isReadonly()
Returns:
true if values are read but not written

isRepresentedBy

public boolean isRepresentedBy(String command)
String.equalsIgnoreCase(String) compare the given string representation of command against the Enum.toString() representation of the command as well as its given alias.

Parameters:
command -
Returns:
true if positive match.

validateArgumentCount

public void validateArgumentCount(int nrArguments)
Validates given argument count against expected ones.

Parameters:
nrArguments -
Throws:
{@link - IllegalArgumentException} in case argument count does not match expected.

failsafeCommandLookup

public static RedisCommand failsafeCommandLookup(String key)
Returns the command represented by the given key. Returns UNKNOWN if no matching command could be found.

Parameters:
key -
Returns: