Spring Data Key-Value

org.springframework.data.keyvalue.redis.connection
Interface StringRedisConnection

All Superinterfaces:
RedisCommands, RedisConnection, RedisHashCommands, RedisListCommands, RedisPubSubCommands, 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.

Author:
Costin Leau
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.keyvalue.redis.connection.RedisListCommands
RedisListCommands.Position
 
Nested classes/interfaces inherited from interface org.springframework.data.keyvalue.redis.connection.RedisZSetCommands
RedisZSetCommands.Aggregate, RedisZSetCommands.Tuple
 
Method Summary
 Long append(String key, String value)
           
 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)
           
 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, int start, int end)
           
 String getSet(String key, String value)
           
 Boolean hDel(String key, String field)
           
 Boolean hExists(String key, String field)
           
 String hGet(String key, String field)
           
 Map<String,String> hGetAll(String key)
           
 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)
           
 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 value)
           
 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)
           
 void mSetNXString(Map<String,String> tuple)
           
 void mSetString(Map<String,String> tuple)
           
 Boolean persist(String key)
           
 void pSubscribe(MessageListener listener, String... patterns)
           
 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 value)
           
 Long rPushX(String key, String value)
           
 Boolean sAdd(String key, String value)
           
 Long sCard(String key)
           
 Set<String> sDiff(String... keys)
           
 void 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, int start, int end)
           
 Set<String> sInter(String... keys)
           
 void 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)
           
 Boolean sRem(String key, String value)
           
 Long strLen(String key)
           
 void subscribe(MessageListener listener, String... channels)
           
 Set<String> sUnion(String... keys)
           
 void sUnionStore(String destKey, String... keys)
           
 Long ttl(String key)
           
 DataType type(String key)
           
 Boolean zAdd(String key, double score, String value)
           
 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> zRangeByScoreWithScore(String key, double min, double max)
           
 Set<StringRedisConnection.StringTuple> zRangeByScoreWithScore(String key, double min, double max, long offset, long count)
           
 Set<StringRedisConnection.StringTuple> zRangeWithScore(String key, long start, long end)
           
 Long zRank(String key, String value)
           
 Boolean zRem(String key, String value)
           
 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<StringRedisConnection.StringTuple> zRevRangeWithScore(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.keyvalue.redis.connection.RedisConnection
close, closePipeline, getNativeConnection, isClosed, isPipelined, isQueueing, openPipeline
 
Methods inherited from interface org.springframework.data.keyvalue.redis.connection.RedisCommands
del, echo, exists, expire, expireAt, keys, persist, ping, randomKey, rename, renameNX, select, sort, sort, ttl, type
 
Methods inherited from interface org.springframework.data.keyvalue.redis.connection.RedisTxCommands
discard, exec, multi, unwatch, watch
 
Methods inherited from interface org.springframework.data.keyvalue.redis.connection.RedisStringCommands
append, decr, decrBy, get, getBit, getRange, getSet, incr, incrBy, mGet, mSet, mSetNX, set, setBit, setEx, setNX, setRange, strLen
 
Methods inherited from interface org.springframework.data.keyvalue.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.keyvalue.redis.connection.RedisSetCommands
sAdd, sCard, sDiff, sDiffStore, sInter, sInterStore, sIsMember, sMembers, sMove, sPop, sRandMember, sRem, sUnion, sUnionStore
 
Methods inherited from interface org.springframework.data.keyvalue.redis.connection.RedisZSetCommands
zAdd, zCard, zCount, zIncrBy, zInterStore, zInterStore, zRange, zRangeByScore, zRangeByScore, zRangeByScoreWithScore, zRangeByScoreWithScore, zRangeWithScore, zRank, zRem, zRemRange, zRemRangeByScore, zRevRange, zRevRangeWithScore, zRevRank, zScore, zUnionStore, zUnionStore
 
Methods inherited from interface org.springframework.data.keyvalue.redis.connection.RedisHashCommands
hDel, hExists, hGet, hGetAll, hIncrBy, hKeys, hLen, hMGet, hMSet, hSet, hSetNX, hVals
 
Methods inherited from interface org.springframework.data.keyvalue.redis.connection.RedisServerCommands
bgSave, bgWriteAof, dbSize, flushAll, flushDb, getConfig, info, lastSave, resetConfigStats, save, setConfig, shutdown
 
Methods inherited from interface org.springframework.data.keyvalue.redis.connection.RedisPubSubCommands
getSubscription, isSubscribed, pSubscribe, publish, subscribe
 

Method Detail

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)

expireAt

Boolean expireAt(String key,
                 long unixTime)

persist

Boolean persist(String key)

ttl

Long ttl(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

void mSetNXString(Map<String,String> tuple)

incr

Long incr(String key)

incrBy

Long incrBy(String key,
            long 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,
                int start,
                int end)

setRange

void setRange(String key,
              int start,
              int end)

getBit

Boolean getBit(String key,
               long offset)

setBit

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

strLen

Long strLen(String key)

rPush

Long rPush(String key,
           String value)

lPush

Long lPush(String key,
           String value)

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

Boolean sAdd(String key,
             String value)

sRem

Boolean sRem(String key,
             String value)

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

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

sUnion

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

sUnionStore

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

sDiff

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

sDiffStore

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

sMembers

Set<String> sMembers(String key)

sRandMember

String sRandMember(String key)

zAdd

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

zRem

Boolean zRem(String key,
             String value)

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)

zRangeWithScore

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

zRevRange

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

zRevRangeWithScore

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

zRangeByScore

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

zRangeByScoreWithScore

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

zRangeByScore

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

zRangeByScoreWithScore

Set<StringRedisConnection.StringTuple> zRangeByScoreWithScore(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)

hExists

Boolean hExists(String key,
                String field)

hDel

Boolean hDel(String key,
             String field)

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)

Spring Data Key-Value

Copyright © 2010-2011 SpringSource. All Rights Reserved.