org.springframework.data.redis.connection
Interface StringRedisConnection

All Superinterfaces:
RedisCommands, RedisConnection, RedisConnectionCommands, RedisHashCommands, RedisKeyCommands, RedisListCommands, RedisPubSubCommands, RedisScriptingCommands, RedisServerCommands, RedisSetCommands, RedisStringCommands, RedisTxCommands, RedisZSetCommands
All Known Implementing Classes:
DefaultStringRedisConnection

public interface StringRedisConnection
extends RedisConnection

Convenience extension of RedisConnection that accepts and returns Strings instead of byte arrays. Uses a RedisSerializer underneath to perform the conversion.

See Also:
RedisCallback, RedisSerializer, StringRedisTemplate

Nested Class Summary
static interface StringRedisConnection.StringTuple
          String-friendly ZSet tuple.
 
Nested classes/interfaces inherited from interface org.springframework.data.redis.connection.RedisStringCommands
RedisStringCommands.BitOperation
 
Nested classes/interfaces inherited from interface org.springframework.data.redis.connection.RedisListCommands
RedisListCommands.Position
 
Nested classes/interfaces inherited from interface org.springframework.data.redis.connection.RedisZSetCommands
RedisZSetCommands.Aggregate, RedisZSetCommands.Tuple
 
Method Summary
 Long append(String key, String value)
           
 Long bitCount(String key)
           
 Long bitCount(String key, long begin, long end)
           
 Long bitOp(RedisStringCommands.BitOperation op, String destination, String... keys)
           
 List<String> bLPop(int timeout, String... keys)
           
 List<String> bRPop(int timeout, String... keys)
           
 String bRPopLPush(int timeout, String srcKey, String dstKey)
           
 Long decr(String key)
           
 Long decrBy(String key, long value)
           
 Long del(String... keys)
           
 String echo(String message)
           
<T> T
eval(String script, ReturnType returnType, int numKeys, String... keysAndArgs)
           
<T> T
evalSha(String scriptSha1, ReturnType returnType, int numKeys, String... keysAndArgs)
           
 Object execute(String command)
           
 Object execute(String command, String... args)
           
 Boolean exists(String key)
           
 Boolean expire(String key, long seconds)
           
 Boolean expireAt(String key, long unixTime)
           
 String get(String key)
           
 Boolean getBit(String key, long offset)
           
 String getRange(String key, long start, long end)
           
 String getSet(String key, String value)
           
 Long hDel(String key, String... fields)
           
 Boolean hExists(String key, String field)
           
 String hGet(String key, String field)
           
 Map<String,String> hGetAll(String key)
           
 Double hIncrBy(String key, String field, double delta)
           
 Long hIncrBy(String key, String field, long delta)
           
 Set<String> hKeys(String key)
           
 Long hLen(String key)
           
 List<String> hMGet(String key, String... fields)
           
 void hMSet(String key, Map<String,String> hashes)
           
 Boolean hSet(String key, String field, String value)
           
 Boolean hSetNX(String key, String field, String value)
           
 List<String> hVals(String key)
           
 Long incr(String key)
           
 Double incrBy(String key, double value)
           
 Long incrBy(String key, long value)
           
 Collection<String> keys(String pattern)
           
 String lIndex(String key, long index)
           
 Long lInsert(String key, RedisListCommands.Position where, String pivot, String value)
           
 Long lLen(String key)
           
 String lPop(String key)
           
 Long lPush(String key, String... values)
           
 Long lPushX(String key, String value)
           
 List<String> lRange(String key, long start, long end)
           
 Long lRem(String key, long count, String value)
           
 void lSet(String key, long index, String value)
           
 void lTrim(String key, long start, long end)
           
 List<String> mGet(String... keys)
           
 Boolean move(String key, int dbIndex)
           
 Boolean mSetNXString(Map<String,String> tuple)
           
 void mSetString(Map<String,String> tuple)
           
 Boolean persist(String key)
           
 Boolean pExpire(String key, long millis)
           
 Boolean pExpireAt(String key, long unixTimeInMillis)
           
 void pSubscribe(MessageListener listener, String... patterns)
           
 Long pTtl(String key)
           
 Long publish(String channel, String message)
           
 void rename(String oldName, String newName)
           
 Boolean renameNX(String oldName, String newName)
           
 String rPop(String key)
           
 String rPopLPush(String srcKey, String dstKey)
           
 Long rPush(String key, String... values)
           
 Long rPushX(String key, String value)
           
 Long sAdd(String key, String... values)
           
 Long sCard(String key)
           
 String scriptLoad(String script)
           
 Set<String> sDiff(String... keys)
           
 Long sDiffStore(String destKey, String... keys)
           
 void set(String key, String value)
           
 void setBit(String key, long offset, boolean value)
           
 void setEx(String key, long seconds, String value)
           
 Boolean setNX(String key, String value)
           
 void setRange(String key, String value, long offset)
           
 Set<String> sInter(String... keys)
           
 Long sInterStore(String destKey, String... keys)
           
 Boolean sIsMember(String key, String value)
           
 Set<String> sMembers(String key)
           
 Boolean sMove(String srcKey, String destKey, String value)
           
 List<String> sort(String key, SortParameters params)
           
 Long sort(String key, SortParameters params, String storeKey)
           
 String sPop(String key)
           
 String sRandMember(String key)
           
 List<String> sRandMember(String key, long count)
           
 Long sRem(String key, String... values)
           
 Long strLen(String key)
           
 void subscribe(MessageListener listener, String... channels)
           
 Set<String> sUnion(String... keys)
           
 Long sUnionStore(String destKey, String... keys)
           
 Long ttl(String key)
           
 DataType type(String key)
           
 Boolean zAdd(String key, double score, String value)
           
 Long zAdd(String key, Set<StringRedisConnection.StringTuple> tuples)
           
 Long zCard(String key)
           
 Long zCount(String key, double min, double max)
           
 Double zIncrBy(String key, double increment, String value)
           
 Long zInterStore(String destKey, RedisZSetCommands.Aggregate aggregate, int[] weights, String... sets)
           
 Long zInterStore(String destKey, String... sets)
           
 Set<String> zRange(String key, long start, long end)
           
 Set<String> zRangeByScore(String key, double min, double max)
           
 Set<String> zRangeByScore(String key, double min, double max, long offset, long count)
           
 Set<StringRedisConnection.StringTuple> zRangeByScoreWithScores(String key, double min, double max)
           
 Set<StringRedisConnection.StringTuple> zRangeByScoreWithScores(String key, double min, double max, long offset, long count)
           
 Set<StringRedisConnection.StringTuple> zRangeWithScores(String key, long start, long end)
           
 Long zRank(String key, String value)
           
 Long zRem(String key, String... values)
           
 Long zRemRange(String key, long start, long end)
           
 Long zRemRangeByScore(String key, double min, double max)
           
 Set<String> zRevRange(String key, long start, long end)
           
 Set<String> zRevRangeByScore(String key, double min, double max)
           
 Set<String> zRevRangeByScore(String key, double min, double max, long offset, long count)
           
 Set<StringRedisConnection.StringTuple> zRevRangeByScoreWithScores(String key, double min, double max)
           
 Set<StringRedisConnection.StringTuple> zRevRangeByScoreWithScores(String key, double min, double max, long offset, long count)
           
 Set<StringRedisConnection.StringTuple> zRevRangeWithScores(String key, long start, long end)
           
 Long zRevRank(String key, String value)
           
 Double zScore(String key, String value)
           
 Long zUnionStore(String destKey, RedisZSetCommands.Aggregate aggregate, int[] weights, String... sets)
           
 Long zUnionStore(String destKey, String... sets)
           
 
Methods inherited from interface org.springframework.data.redis.connection.RedisConnection
close, closePipeline, getNativeConnection, isClosed, isPipelined, isQueueing, openPipeline
 
Methods inherited from interface org.springframework.data.redis.connection.RedisCommands
execute
 
Methods inherited from interface org.springframework.data.redis.connection.RedisKeyCommands
del, dump, exists, expire, expireAt, keys, move, persist, pExpire, pExpireAt, pTtl, randomKey, rename, renameNX, restore, sort, sort, ttl, type
 
Methods inherited from interface org.springframework.data.redis.connection.RedisStringCommands
append, bitCount, bitCount, bitOp, decr, decrBy, get, getBit, getRange, getSet, incr, incrBy, incrBy, mGet, mSet, mSetNX, set, setBit, setEx, setNX, setRange, strLen
 
Methods inherited from interface org.springframework.data.redis.connection.RedisListCommands
bLPop, bRPop, bRPopLPush, lIndex, lInsert, lLen, lPop, lPush, lPushX, lRange, lRem, lSet, lTrim, rPop, rPopLPush, rPush, rPushX
 
Methods inherited from interface org.springframework.data.redis.connection.RedisSetCommands
sAdd, sCard, sDiff, sDiffStore, sInter, sInterStore, sIsMember, sMembers, sMove, sPop, sRandMember, sRandMember, sRem, sUnion, sUnionStore
 
Methods inherited from interface org.springframework.data.redis.connection.RedisZSetCommands
zAdd, zAdd, zCard, zCount, zIncrBy, zInterStore, zInterStore, zRange, zRangeByScore, zRangeByScore, zRangeByScoreWithScores, zRangeByScoreWithScores, zRangeWithScores, zRank, zRem, zRemRange, zRemRangeByScore, zRevRange, zRevRangeByScore, zRevRangeByScore, zRevRangeByScoreWithScores, zRevRangeByScoreWithScores, zRevRangeWithScores, zRevRank, zScore, zUnionStore, zUnionStore
 
Methods inherited from interface org.springframework.data.redis.connection.RedisHashCommands
hDel, hExists, hGet, hGetAll, hIncrBy, hIncrBy, hKeys, hLen, hMGet, hMSet, hSet, hSetNX, hVals
 
Methods inherited from interface org.springframework.data.redis.connection.RedisTxCommands
discard, exec, multi, unwatch, watch
 
Methods inherited from interface org.springframework.data.redis.connection.RedisPubSubCommands
getSubscription, isSubscribed, pSubscribe, publish, subscribe
 
Methods inherited from interface org.springframework.data.redis.connection.RedisConnectionCommands
echo, ping, select
 
Methods inherited from interface org.springframework.data.redis.connection.RedisServerCommands
bgSave, bgWriteAof, dbSize, flushAll, flushDb, getConfig, info, info, lastSave, resetConfigStats, save, setConfig, shutdown
 
Methods inherited from interface org.springframework.data.redis.connection.RedisScriptingCommands
eval, evalSha, scriptExists, scriptFlush, scriptKill, scriptLoad
 

Method Detail

execute

Object execute(String command,
               String... args)

execute

Object execute(String command)

exists

Boolean exists(String key)

del

Long del(String... keys)

type

DataType type(String key)

keys

Collection<String> keys(String pattern)

rename

void rename(String oldName,
            String newName)

renameNX

Boolean renameNX(String oldName,
                 String newName)

expire

Boolean expire(String key,
               long seconds)

pExpire

Boolean pExpire(String key,
                long millis)

expireAt

Boolean expireAt(String key,
                 long unixTime)

pExpireAt

Boolean pExpireAt(String key,
                  long unixTimeInMillis)

persist

Boolean persist(String key)

move

Boolean move(String key,
             int dbIndex)

ttl

Long ttl(String key)

pTtl

Long pTtl(String key)

echo

String echo(String message)

sort

List<String> sort(String key,
                  SortParameters params)

sort

Long sort(String key,
          SortParameters params,
          String storeKey)

get

String get(String key)

getSet

String getSet(String key,
              String value)

mGet

List<String> mGet(String... keys)

set

void set(String key,
         String value)

setNX

Boolean setNX(String key,
              String value)

setEx

void setEx(String key,
           long seconds,
           String value)

mSetString

void mSetString(Map<String,String> tuple)

mSetNXString

Boolean mSetNXString(Map<String,String> tuple)

incr

Long incr(String key)

incrBy

Long incrBy(String key,
            long value)

incrBy

Double incrBy(String key,
              double value)

decr

Long decr(String key)

decrBy

Long decrBy(String key,
            long value)

append

Long append(String key,
            String value)

getRange

String getRange(String key,
                long start,
                long end)

setRange

void setRange(String key,
              String value,
              long offset)

getBit

Boolean getBit(String key,
               long offset)

setBit

void setBit(String key,
            long offset,
            boolean value)

bitCount

Long bitCount(String key)

bitCount

Long bitCount(String key,
              long begin,
              long end)

bitOp

Long bitOp(RedisStringCommands.BitOperation op,
           String destination,
           String... keys)

strLen

Long strLen(String key)

rPush

Long rPush(String key,
           String... values)

lPush

Long lPush(String key,
           String... values)

rPushX

Long rPushX(String key,
            String value)

lPushX

Long lPushX(String key,
            String value)

lLen

Long lLen(String key)

lRange

List<String> lRange(String key,
                    long start,
                    long end)

lTrim

void lTrim(String key,
           long start,
           long end)

lIndex

String lIndex(String key,
              long index)

lInsert

Long lInsert(String key,
             RedisListCommands.Position where,
             String pivot,
             String value)

lSet

void lSet(String key,
          long index,
          String value)

lRem

Long lRem(String key,
          long count,
          String value)

lPop

String lPop(String key)

rPop

String rPop(String key)

bLPop

List<String> bLPop(int timeout,
                   String... keys)

bRPop

List<String> bRPop(int timeout,
                   String... keys)

rPopLPush

String rPopLPush(String srcKey,
                 String dstKey)

bRPopLPush

String bRPopLPush(int timeout,
                  String srcKey,
                  String dstKey)

sAdd

Long sAdd(String key,
          String... values)

sRem

Long sRem(String key,
          String... values)

sPop

String sPop(String key)

sMove

Boolean sMove(String srcKey,
              String destKey,
              String value)

sCard

Long sCard(String key)

sIsMember

Boolean sIsMember(String key,
                  String value)

sInter

Set<String> sInter(String... keys)

sInterStore

Long sInterStore(String destKey,
                 String... keys)

sUnion

Set<String> sUnion(String... keys)

sUnionStore

Long sUnionStore(String destKey,
                 String... keys)

sDiff

Set<String> sDiff(String... keys)

sDiffStore

Long sDiffStore(String destKey,
                String... keys)

sMembers

Set<String> sMembers(String key)

sRandMember

String sRandMember(String key)

sRandMember

List<String> sRandMember(String key,
                         long count)

zAdd

Boolean zAdd(String key,
             double score,
             String value)

zAdd

Long zAdd(String key,
          Set<StringRedisConnection.StringTuple> tuples)

zRem

Long zRem(String key,
          String... values)

zIncrBy

Double zIncrBy(String key,
               double increment,
               String value)

zRank

Long zRank(String key,
           String value)

zRevRank

Long zRevRank(String key,
              String value)

zRange

Set<String> zRange(String key,
                   long start,
                   long end)

zRangeWithScores

Set<StringRedisConnection.StringTuple> zRangeWithScores(String key,
                                                        long start,
                                                        long end)

zRevRange

Set<String> zRevRange(String key,
                      long start,
                      long end)

zRevRangeWithScores

Set<StringRedisConnection.StringTuple> zRevRangeWithScores(String key,
                                                           long start,
                                                           long end)

zRevRangeByScore

Set<String> zRevRangeByScore(String key,
                             double min,
                             double max)

zRevRangeByScoreWithScores

Set<StringRedisConnection.StringTuple> zRevRangeByScoreWithScores(String key,
                                                                  double min,
                                                                  double max)

zRevRangeByScore

Set<String> zRevRangeByScore(String key,
                             double min,
                             double max,
                             long offset,
                             long count)

zRevRangeByScoreWithScores

Set<StringRedisConnection.StringTuple> zRevRangeByScoreWithScores(String key,
                                                                  double min,
                                                                  double max,
                                                                  long offset,
                                                                  long count)

zRangeByScore

Set<String> zRangeByScore(String key,
                          double min,
                          double max)

zRangeByScoreWithScores

Set<StringRedisConnection.StringTuple> zRangeByScoreWithScores(String key,
                                                               double min,
                                                               double max)

zRangeByScore

Set<String> zRangeByScore(String key,
                          double min,
                          double max,
                          long offset,
                          long count)

zRangeByScoreWithScores

Set<StringRedisConnection.StringTuple> zRangeByScoreWithScores(String key,
                                                               double min,
                                                               double max,
                                                               long offset,
                                                               long count)

zCount

Long zCount(String key,
            double min,
            double max)

zCard

Long zCard(String key)

zScore

Double zScore(String key,
              String value)

zRemRange

Long zRemRange(String key,
               long start,
               long end)

zRemRangeByScore

Long zRemRangeByScore(String key,
                      double min,
                      double max)

zUnionStore

Long zUnionStore(String destKey,
                 String... sets)

zUnionStore

Long zUnionStore(String destKey,
                 RedisZSetCommands.Aggregate aggregate,
                 int[] weights,
                 String... sets)

zInterStore

Long zInterStore(String destKey,
                 String... sets)

zInterStore

Long zInterStore(String destKey,
                 RedisZSetCommands.Aggregate aggregate,
                 int[] weights,
                 String... sets)

hSet

Boolean hSet(String key,
             String field,
             String value)

hSetNX

Boolean hSetNX(String key,
               String field,
               String value)

hGet

String hGet(String key,
            String field)

hMGet

List<String> hMGet(String key,
                   String... fields)

hMSet

void hMSet(String key,
           Map<String,String> hashes)

hIncrBy

Long hIncrBy(String key,
             String field,
             long delta)

hIncrBy

Double hIncrBy(String key,
               String field,
               double delta)

hExists

Boolean hExists(String key,
                String field)

hDel

Long hDel(String key,
          String... fields)

hLen

Long hLen(String key)

hKeys

Set<String> hKeys(String key)

hVals

List<String> hVals(String key)

hGetAll

Map<String,String> hGetAll(String key)

publish

Long publish(String channel,
             String message)

subscribe

void subscribe(MessageListener listener,
               String... channels)

pSubscribe

void pSubscribe(MessageListener listener,
                String... patterns)

scriptLoad

String scriptLoad(String script)

eval

<T> T eval(String script,
           ReturnType returnType,
           int numKeys,
           String... keysAndArgs)

evalSha

<T> T evalSha(String scriptSha1,
              ReturnType returnType,
              int numKeys,
              String... keysAndArgs)