public interface StringRedisConnection extends RedisConnection
RedisConnection that accepts and returns Strings instead of byte arrays.
Uses a RedisSerializer underneath to perform the conversion.RedisCallback,
RedisSerializer,
StringRedisTemplate| Modifier and Type | Interface and Description |
|---|---|
static interface |
StringRedisConnection.StringTuple
String-friendly ZSet tuple.
|
RedisStringCommands.BitOperation, RedisStringCommands.SetOptionRedisListCommands.PositionRedisZSetCommands.Aggregate, RedisZSetCommands.Limit, RedisZSetCommands.Range, RedisZSetCommands.TupleRedisServerCommands.MigrateOption, RedisServerCommands.ShutdownOption| Modifier and Type | Method and Description |
|---|---|
Long |
append(String key,
String value)
Append a
value to key. |
Long |
bitCount(String key)
Count the number of set bits (population counting) in value stored at
key. |
Long |
bitCount(String key,
long begin,
long end)
Count the number of set bits (population counting) of value stored at
key between begin and
end. |
Long |
bitOp(RedisStringCommands.BitOperation op,
String destination,
String... keys)
Perform bitwise operations between strings.
|
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)
Decrement value of
key by 1. |
Long |
decrBy(String key,
long value)
Increment value of
key by 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)
Get the value of
key. |
Boolean |
getBit(String key,
long offset)
Get the bit value at
offset of value at key. |
List<RedisClientInfo> |
getClientList()
Request information and statistics about connected clients.
|
String |
getRange(String key,
long start,
long end)
Get a substring of value of
key between begin and end. |
String |
getSet(String key,
String value)
Set value of
key and return its old 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) |
Cursor<Map.Entry<String,String>> |
hScan(String key,
ScanOptions options) |
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)
Increment value of
key by 1. |
Double |
incrBy(String key,
double value)
Increment value of
key by value. |
Long |
incrBy(String key,
long value)
Increment value of
key by 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)
Get the values of all given
keys. |
Boolean |
move(String key,
int dbIndex) |
Boolean |
mSetNXString(Map<String,String> tuple)
Set multiple keys to multiple values using key-value pairs provided in
tuple only if the provided key does
not exist. |
void |
mSetString(Map<String,String> tuple)
Set multiple keys to multiple values using key-value pairs provided in
tuple. |
Boolean |
persist(String key) |
Boolean |
pExpire(String key,
long millis) |
Boolean |
pExpireAt(String key,
long unixTimeInMillis) |
Long |
pfAdd(String key,
String... values)
Adds given values to the HyperLogLog stored at given key.
|
Long |
pfCount(String... keys) |
void |
pfMerge(String destinationKey,
String... sourceKeys) |
void |
pSetEx(String key,
long milliseconds,
String value)
Set the
value and expiration in milliseconds for key. |
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)
Set
value for key. |
void |
set(String key,
String value,
Expiration expiration,
RedisStringCommands.SetOption option)
Set
value for key applying timeouts from expiration if set and inserting/updating values
depending on option. |
Boolean |
setBit(String key,
long offset,
boolean value)
Sets the bit at
offset in value stored at key. |
void |
setClientName(String name)
Assign given
name to connection using registered RedisSerializer for name conversion. |
void |
setEx(String key,
long seconds,
String value)
Set the
value and expiration in seconds for key. |
Boolean |
setNX(String key,
String value)
Set
value for key, only if key does not exist. |
void |
setRange(String key,
String value,
long offset)
Overwrite parts of
key starting at the specified offset with given value. |
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) |
Cursor<String> |
sScan(String key,
ScanOptions options) |
Long |
strLen(String key)
Get the length of the value stored at
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> |
zRangeByLex(String key)
Get all elements in the sorted set at key in lexicographical ordering.
|
Set<String> |
zRangeByLex(String key,
RedisZSetCommands.Range range)
Get the elements in
Range from the sorted set at key in lexicographical ordering |
Set<String> |
zRangeByLex(String key,
RedisZSetCommands.Range range,
RedisZSetCommands.Limit limit)
Get the elements in
Range from the sorted set at key in lexicographical ordering. |
Set<String> |
zRangeByScore(String key,
double min,
double max) |
Set<String> |
zRangeByScore(String key,
double min,
double max,
long offset,
long count) |
Set<byte[]> |
zRangeByScore(String key,
String min,
String max) |
Set<byte[]> |
zRangeByScore(String key,
String min,
String 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) |
Cursor<StringRedisConnection.StringTuple> |
zScan(String key,
ScanOptions options) |
Double |
zScore(String key,
String value) |
Long |
zUnionStore(String destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
String... sets) |
Long |
zUnionStore(String destKey,
String... sets) |
close, closePipeline, getNativeConnection, getSentinelConnection, isClosed, isPipelined, isQueueing, openPipelineexecutedel, dump, exists, expire, expireAt, keys, move, persist, pExpire, pExpireAt, pTtl, randomKey, rename, renameNX, restore, scan, sort, sort, ttl, typeappend, bitCount, bitCount, bitOp, decr, decrBy, get, getBit, getRange, getSet, incr, incrBy, incrBy, mGet, mSet, mSetNX, pSetEx, set, set, setBit, setEx, setNX, setRange, strLenbLPop, bRPop, bRPopLPush, lIndex, lInsert, lLen, lPop, lPush, lPushX, lRange, lRem, lSet, lTrim, rPop, rPopLPush, rPush, rPushXsAdd, sCard, sDiff, sDiffStore, sInter, sInterStore, sIsMember, sMembers, sMove, sPop, sRandMember, sRandMember, sRem, sScan, sUnion, sUnionStorezAdd, zAdd, zCard, zCount, zCount, zIncrBy, zInterStore, zInterStore, zRange, zRangeByLex, zRangeByLex, zRangeByLex, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScore, zRangeByScoreWithScores, zRangeByScoreWithScores, zRangeByScoreWithScores, zRangeByScoreWithScores, zRangeWithScores, zRank, zRem, zRemRange, zRemRangeByScore, zRemRangeByScore, zRevRange, zRevRangeByScore, zRevRangeByScore, zRevRangeByScore, zRevRangeByScore, zRevRangeByScoreWithScores, zRevRangeByScoreWithScores, zRevRangeByScoreWithScores, zRevRangeByScoreWithScores, zRevRangeWithScores, zRevRank, zScan, zScore, zUnionStore, zUnionStorehDel, hExists, hGet, hGetAll, hIncrBy, hIncrBy, hKeys, hLen, hMGet, hMSet, hScan, hSet, hSetNX, hValsdiscard, exec, multi, unwatch, watchgetSubscription, isSubscribed, pSubscribe, publish, subscribeecho, ping, selectbgReWriteAof, bgSave, bgWriteAof, dbSize, flushAll, flushDb, getClientName, getConfig, info, info, killClient, lastSave, migrate, migrate, resetConfigStats, save, setClientName, setConfig, shutdown, shutdown, slaveOf, slaveOfNoOne, timeeval, evalSha, evalSha, scriptExists, scriptFlush, scriptKill, scriptLoadpfAdd, pfCount, pfMergeCollection<String> keys(String pattern)
List<String> sort(String key, SortParameters params)
Long sort(String key, SortParameters params, String storeKey)
String get(String key)
key.
See http://redis.io/commands/get
key - must not be null.String getSet(String key, String value)
key and return its old value.
See http://redis.io/commands/getset
key - must not be null.value - List<String> mGet(String... keys)
keys.
See http://redis.io/commands/mget
keys - void set(String key, String value)
value for key.
See http://redis.io/commands/set
key - must not be null.value - must not be null.void set(String key, String value, Expiration expiration, RedisStringCommands.SetOption option)
value for key applying timeouts from expiration if set and inserting/updating values
depending on option.
See http://redis.io/commands/set
key - must not be null.value - must not be null.expiration - can be null. Defaulted to Expiration.persistent().option - can be null. Defaulted to SetOption#UPSERT.Boolean setNX(String key, String value)
value for key, only if key does not exist.
See http://redis.io/commands/setnx
key - must not be null.value - must not be null.void setEx(String key, long seconds, String value)
value and expiration in seconds for key.
See http://redis.io/commands/setex
key - must not be null.seconds - value - must not be null.void pSetEx(String key, long milliseconds, String value)
value and expiration in milliseconds for key.
See http://redis.io/commands/psetex
key - must not be null.milliseconds - value - must not be null.void mSetString(Map<String,String> tuple)
tuple.
See http://redis.io/commands/mset
tuple - Boolean mSetNXString(Map<String,String> tuple)
tuple only if the provided key does
not exist.
See http://redis.io/commands/msetnx
tuple - Long incr(String key)
key by 1.
See http://redis.io/commands/incr
key - must not be null.Long incrBy(String key, long value)
key by value.
See http://redis.io/commands/incrby
key - must not be null.value - Double incrBy(String key, double value)
key by value.
See http://redis.io/commands/incrbyfloat
key - must not be null.value - Long decr(String key)
key by 1.
See http://redis.io/commands/decr
key - must not be null.Long decrBy(String key, long value)
key by value.
See http://redis.io/commands/decrby
key - must not be null.value - Long append(String key, String value)
value to key.
See http://redis.io/commands/append
key - must not be null.value - String getRange(String key, long start, long end)
key between begin and end.
See http://redis.io/commands/getrange
key - must not be null.start - end - void setRange(String key, String value, long offset)
key starting at the specified offset with given value.
See http://redis.io/commands/setrange
key - must not be null.value - offset - Boolean getBit(String key, long offset)
offset of value at key.
See http://redis.io/commands/getbit
key - must not be null.offset - Boolean setBit(String key, long offset, boolean value)
offset in value stored at key.
See http://redis.io/commands/setbit
key - must not be null.offset - value - offset.Long bitCount(String key)
key.
See http://redis.io/commands/bitcount
key - must not be null.Long bitCount(String key, long begin, long end)
key between begin and
end.
See http://redis.io/commands/bitcount
key - must not be null.begin - end - Long bitOp(RedisStringCommands.BitOperation op, String destination, String... keys)
See http://redis.io/commands/bitop
op - destination - keys - Long strLen(String key)
key.
See http://redis.io/commands/strlen
key - must not be null.void lTrim(String key, long start, long end)
Long lInsert(String key, RedisListCommands.Position where, String pivot, String value)
Long zAdd(String key, Set<StringRedisConnection.StringTuple> tuples)
Set<StringRedisConnection.StringTuple> zRangeWithScores(String key, long start, long end)
Set<StringRedisConnection.StringTuple> zRevRangeWithScores(String key, long start, long end)
Set<StringRedisConnection.StringTuple> zRevRangeByScoreWithScores(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, long offset, long count)
Set<StringRedisConnection.StringTuple> zRangeByScoreWithScores(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, long offset, long count)
Long zUnionStore(String destKey, RedisZSetCommands.Aggregate aggregate, int[] weights, String... sets)
Long zInterStore(String destKey, RedisZSetCommands.Aggregate aggregate, int[] weights, String... sets)
void subscribe(MessageListener listener, String... channels)
void pSubscribe(MessageListener listener, String... patterns)
<T> T eval(String script, ReturnType returnType, int numKeys, String... keysAndArgs)
<T> T evalSha(String scriptSha1, ReturnType returnType, int numKeys, String... keysAndArgs)
void setClientName(String name)
name to connection using registered RedisSerializer for name conversion.name - RedisServerCommands.setClientName(byte[])List<RedisClientInfo> getClientList()
RedisServerCommandsSee http://redis.io/commands/client-list
getClientList in interface RedisServerCommandsList of RedisClientInfo objects.RedisServerCommands.getClientList()Cursor<Map.Entry<String,String>> hScan(String key, ScanOptions options)
key - must not be null.options - RedisHashCommands.hScan(byte[], ScanOptions)Cursor<String> sScan(String key, ScanOptions options)
key - must not be null.options - RedisSetCommands.sScan(byte[], ScanOptions)Cursor<StringRedisConnection.StringTuple> zScan(String key, ScanOptions options)
key - must not be null.options - RedisZSetCommands.zScan(byte[], ScanOptions)Set<byte[]> zRangeByScore(String key, String min, String max)
key - must not be null.min - max - Set<byte[]> zRangeByScore(String key, String min, String max, long offset, long count)
key - must not be null.min - max - offset - count - Long pfAdd(String key, String... values)
key - must not be null.values - void pfMerge(String destinationKey, String... sourceKeys)
destinationKey - sourceKeys - Set<String> zRangeByLex(String key)
key - must not be null.Set<String> zRangeByLex(String key, RedisZSetCommands.Range range)
Range from the sorted set at key in lexicographical orderingkey - must not be null.range - must not be null.Set<String> zRangeByLex(String key, RedisZSetCommands.Range range, RedisZSetCommands.Limit limit)
Range from the sorted set at key in lexicographical ordering. Result is
limited via Limit.key - must not be null.range - must not be null.range - can be null.Copyright © 2011-2015–2016 Pivotal Software, Inc.. All rights reserved.