|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.data.redis.connection.DefaultStringRedisConnection
public class DefaultStringRedisConnection
Default implementation of StringRedisConnection.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.springframework.data.redis.connection.StringRedisConnection |
|---|
StringRedisConnection.StringTuple |
| 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 |
| Constructor Summary | |
|---|---|
DefaultStringRedisConnection(RedisConnection connection)
Constructs a new DefaultStringRedisConnection instance. |
|
DefaultStringRedisConnection(RedisConnection connection,
RedisSerializer<String> serializer)
Constructs a new DefaultStringRedisConnection instance. |
|
| Method Summary | ||
|---|---|---|
Long |
append(byte[] key,
byte[] value)
|
|
Long |
append(String key,
String value)
|
|
void |
bgSave()
|
|
void |
bgWriteAof()
|
|
Long |
bitCount(byte[] key)
|
|
Long |
bitCount(byte[] key,
long begin,
long end)
|
|
Long |
bitCount(String key)
|
|
Long |
bitCount(String key,
long begin,
long end)
|
|
Long |
bitOp(RedisStringCommands.BitOperation op,
byte[] destination,
byte[]... keys)
|
|
Long |
bitOp(RedisStringCommands.BitOperation op,
String destination,
String... keys)
|
|
List<byte[]> |
bLPop(int timeout,
byte[]... keys)
|
|
List<String> |
bLPop(int timeout,
String... keys)
|
|
List<byte[]> |
bRPop(int timeout,
byte[]... keys)
|
|
List<String> |
bRPop(int timeout,
String... keys)
|
|
byte[] |
bRPopLPush(int timeout,
byte[] srcKey,
byte[] dstKey)
|
|
String |
bRPopLPush(int timeout,
String srcKey,
String dstKey)
|
|
void |
close()
Closes (or quits) the connection. |
|
List<Object> |
closePipeline()
Executes the commands in the pipeline and returns their result. |
|
Long |
dbSize()
|
|
Long |
decr(byte[] key)
|
|
Long |
decr(String key)
|
|
Long |
decrBy(byte[] key,
long value)
|
|
Long |
decrBy(String key,
long value)
|
|
Long |
del(byte[]... keys)
|
|
Long |
del(String... keys)
|
|
void |
discard()
|
|
byte[] |
dump(byte[] key)
|
|
byte[] |
echo(byte[] message)
|
|
String |
echo(String message)
|
|
|
eval(byte[] script,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
|
|
|
eval(String script,
ReturnType returnType,
int numKeys,
String... keysAndArgs)
NOTE: This method will not deserialize Strings returned by Lua scripts, as they may not be encoded with the same serializer used here. |
|
|
evalSha(String scriptSha1,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
|
|
|
evalSha(String scriptSha1,
ReturnType returnType,
int numKeys,
String... keysAndArgs)
NOTE: This method will not deserialize Strings returned by Lua scripts, as they may not be encoded with the same serializer used here. |
|
List<Object> |
exec()
|
|
Object |
execute(String command)
|
|
Object |
execute(String command,
byte[]... args)
'Native' or 'raw' execution of the given command along-side the given arguments. |
|
Object |
execute(String command,
String... args)
|
|
Boolean |
exists(byte[] key)
|
|
Boolean |
exists(String key)
|
|
Boolean |
expire(byte[] key,
long seconds)
|
|
Boolean |
expire(String key,
long seconds)
|
|
Boolean |
expireAt(byte[] key,
long unixTime)
|
|
Boolean |
expireAt(String key,
long unixTime)
|
|
void |
flushAll()
|
|
void |
flushDb()
|
|
byte[] |
get(byte[] key)
|
|
String |
get(String key)
|
|
Boolean |
getBit(byte[] key,
long offset)
|
|
Boolean |
getBit(String key,
long offset)
|
|
List<String> |
getConfig(String pattern)
|
|
Object |
getNativeConnection()
Returns the native connection (the underlying library/driver object). |
|
byte[] |
getRange(byte[] key,
long start,
long end)
|
|
String |
getRange(String key,
long start,
long end)
|
|
byte[] |
getSet(byte[] key,
byte[] value)
|
|
String |
getSet(String key,
String value)
|
|
Subscription |
getSubscription()
Returns the current subscription for this connection or null if the connection is not subscribed. |
|
Long |
hDel(byte[] key,
byte[]... fields)
|
|
Long |
hDel(String key,
String... fields)
|
|
Boolean |
hExists(byte[] key,
byte[] field)
|
|
Boolean |
hExists(String key,
String field)
|
|
byte[] |
hGet(byte[] key,
byte[] field)
|
|
String |
hGet(String key,
String field)
|
|
Map<byte[],byte[]> |
hGetAll(byte[] key)
|
|
Map<String,String> |
hGetAll(String key)
|
|
Double |
hIncrBy(byte[] key,
byte[] field,
double delta)
|
|
Long |
hIncrBy(byte[] key,
byte[] field,
long delta)
|
|
Double |
hIncrBy(String key,
String field,
double delta)
|
|
Long |
hIncrBy(String key,
String field,
long delta)
|
|
Set<byte[]> |
hKeys(byte[] key)
|
|
Set<String> |
hKeys(String key)
|
|
Long |
hLen(byte[] key)
|
|
Long |
hLen(String key)
|
|
List<byte[]> |
hMGet(byte[] key,
byte[]... fields)
|
|
List<String> |
hMGet(String key,
String... fields)
|
|
void |
hMSet(byte[] key,
Map<byte[],byte[]> hashes)
|
|
void |
hMSet(String key,
Map<String,String> hashes)
|
|
Boolean |
hSet(byte[] key,
byte[] field,
byte[] value)
|
|
Boolean |
hSet(String key,
String field,
String value)
|
|
Boolean |
hSetNX(byte[] key,
byte[] field,
byte[] value)
|
|
Boolean |
hSetNX(String key,
String field,
String value)
|
|
List<byte[]> |
hVals(byte[] key)
|
|
List<String> |
hVals(String key)
|
|
Long |
incr(byte[] key)
|
|
Long |
incr(String key)
|
|
Double |
incrBy(byte[] key,
double value)
|
|
Long |
incrBy(byte[] key,
long value)
|
|
Double |
incrBy(String key,
double value)
|
|
Long |
incrBy(String key,
long value)
|
|
Properties |
info()
|
|
Properties |
info(String section)
|
|
boolean |
isClosed()
Indicates whether the underlying connection is closed or not. |
|
boolean |
isPipelined()
Indicates whether the connection is currently pipelined or not. |
|
boolean |
isQueueing()
Indicates whether the connection is in "queue"(or "MULTI") mode or not. |
|
boolean |
isSubscribed()
Indicates whether the current connection is subscribed (to at least one channel) or not. |
|
Set<byte[]> |
keys(byte[] pattern)
|
|
Collection<String> |
keys(String pattern)
|
|
Long |
lastSave()
|
|
byte[] |
lIndex(byte[] key,
long index)
|
|
String |
lIndex(String key,
long index)
|
|
Long |
lInsert(byte[] key,
RedisListCommands.Position where,
byte[] pivot,
byte[] value)
|
|
Long |
lInsert(String key,
RedisListCommands.Position where,
String pivot,
String value)
|
|
Long |
lLen(byte[] key)
|
|
Long |
lLen(String key)
|
|
byte[] |
lPop(byte[] key)
|
|
String |
lPop(String key)
|
|
Long |
lPush(byte[] key,
byte[]... values)
|
|
Long |
lPush(String key,
String... values)
|
|
Long |
lPushX(byte[] key,
byte[] value)
|
|
Long |
lPushX(String key,
String value)
|
|
List<byte[]> |
lRange(byte[] key,
long start,
long end)
|
|
List<String> |
lRange(String key,
long start,
long end)
|
|
Long |
lRem(byte[] key,
long count,
byte[] value)
|
|
Long |
lRem(String key,
long count,
String value)
|
|
void |
lSet(byte[] key,
long index,
byte[] value)
|
|
void |
lSet(String key,
long index,
String value)
|
|
void |
lTrim(byte[] key,
long start,
long end)
|
|
void |
lTrim(String key,
long start,
long end)
|
|
List<byte[]> |
mGet(byte[]... keys)
|
|
List<String> |
mGet(String... keys)
|
|
Boolean |
move(byte[] key,
int dbIndex)
|
|
Boolean |
move(String key,
int dbIndex)
|
|
void |
mSet(Map<byte[],byte[]> tuple)
|
|
Boolean |
mSetNX(Map<byte[],byte[]> tuple)
|
|
Boolean |
mSetNXString(Map<String,String> tuple)
|
|
void |
mSetString(Map<String,String> tuple)
|
|
void |
multi()
|
|
void |
openPipeline()
Activates the pipeline mode for this connection. |
|
Boolean |
persist(byte[] key)
|
|
Boolean |
persist(String key)
|
|
Boolean |
pExpire(byte[] key,
long millis)
|
|
Boolean |
pExpire(String key,
long millis)
|
|
Boolean |
pExpireAt(byte[] key,
long unixTimeInMillis)
|
|
Boolean |
pExpireAt(String key,
long unixTimeInMillis)
|
|
String |
ping()
|
|
void |
pSubscribe(MessageListener listener,
byte[]... patterns)
Subscribes the connection to all channels matching the given patterns. |
|
void |
pSubscribe(MessageListener listener,
String... patterns)
|
|
Long |
pTtl(byte[] key)
|
|
Long |
pTtl(String key)
|
|
Long |
publish(byte[] channel,
byte[] message)
Publishes the given message to the given channel. |
|
Long |
publish(String channel,
String message)
|
|
byte[] |
randomKey()
|
|
void |
rename(byte[] oldName,
byte[] newName)
|
|
void |
rename(String oldName,
String newName)
|
|
Boolean |
renameNX(byte[] oldName,
byte[] newName)
|
|
Boolean |
renameNX(String oldName,
String newName)
|
|
void |
resetConfigStats()
|
|
void |
restore(byte[] key,
long ttlInMillis,
byte[] serializedValue)
|
|
byte[] |
rPop(byte[] key)
|
|
String |
rPop(String key)
|
|
byte[] |
rPopLPush(byte[] srcKey,
byte[] dstKey)
|
|
String |
rPopLPush(String srcKey,
String dstKey)
|
|
Long |
rPush(byte[] key,
byte[]... values)
|
|
Long |
rPush(String key,
String... values)
|
|
Long |
rPushX(byte[] key,
byte[] value)
|
|
Long |
rPushX(String key,
String value)
|
|
Long |
sAdd(byte[] key,
byte[]... values)
|
|
Long |
sAdd(String key,
String... values)
|
|
void |
save()
|
|
Long |
sCard(byte[] key)
|
|
Long |
sCard(String key)
|
|
List<Boolean> |
scriptExists(String... scriptSha1)
|
|
void |
scriptFlush()
|
|
void |
scriptKill()
|
|
String |
scriptLoad(byte[] script)
|
|
String |
scriptLoad(String script)
|
|
Set<byte[]> |
sDiff(byte[]... keys)
|
|
Set<String> |
sDiff(String... keys)
|
|
Long |
sDiffStore(byte[] destKey,
byte[]... keys)
|
|
Long |
sDiffStore(String destKey,
String... keys)
|
|
void |
select(int dbIndex)
|
|
void |
set(byte[] key,
byte[] value)
|
|
void |
set(String key,
String value)
|
|
void |
setBit(byte[] key,
long offset,
boolean value)
|
|
void |
setBit(String key,
long offset,
boolean value)
|
|
void |
setConfig(String param,
String value)
|
|
void |
setDeserializePipelineAndTxResults(boolean deserializePipelineAndTxResults)
Specifies if pipelined and tx results should be deserialized to Strings. |
|
void |
setEx(byte[] key,
long seconds,
byte[] value)
|
|
void |
setEx(String key,
long seconds,
String value)
|
|
Boolean |
setNX(byte[] key,
byte[] value)
|
|
Boolean |
setNX(String key,
String value)
|
|
void |
setRange(byte[] key,
byte[] value,
long start)
|
|
void |
setRange(String key,
String value,
long start)
|
|
void |
shutdown()
|
|
Set<byte[]> |
sInter(byte[]... keys)
|
|
Set<String> |
sInter(String... keys)
|
|
Long |
sInterStore(byte[] destKey,
byte[]... keys)
|
|
Long |
sInterStore(String destKey,
String... keys)
|
|
Boolean |
sIsMember(byte[] key,
byte[] value)
|
|
Boolean |
sIsMember(String key,
String value)
|
|
Set<byte[]> |
sMembers(byte[] key)
|
|
Set<String> |
sMembers(String key)
|
|
Boolean |
sMove(byte[] srcKey,
byte[] destKey,
byte[] value)
|
|
Boolean |
sMove(String srcKey,
String destKey,
String value)
|
|
List<byte[]> |
sort(byte[] key,
SortParameters params)
|
|
Long |
sort(byte[] key,
SortParameters params,
byte[] storeKey)
|
|
List<String> |
sort(String key,
SortParameters params)
|
|
Long |
sort(String key,
SortParameters params,
String storeKey)
|
|
byte[] |
sPop(byte[] key)
|
|
String |
sPop(String key)
|
|
byte[] |
sRandMember(byte[] key)
|
|
List<byte[]> |
sRandMember(byte[] key,
long count)
|
|
String |
sRandMember(String key)
|
|
List<String> |
sRandMember(String key,
long count)
|
|
Long |
sRem(byte[] key,
byte[]... values)
|
|
Long |
sRem(String key,
String... values)
|
|
Long |
strLen(byte[] key)
|
|
Long |
strLen(String key)
|
|
void |
subscribe(MessageListener listener,
byte[]... channels)
Subscribes the connection to the given channels. |
|
void |
subscribe(MessageListener listener,
String... channels)
|
|
Set<byte[]> |
sUnion(byte[]... keys)
|
|
Set<String> |
sUnion(String... keys)
|
|
Long |
sUnionStore(byte[] destKey,
byte[]... keys)
|
|
Long |
sUnionStore(String destKey,
String... keys)
|
|
Long |
ttl(byte[] key)
|
|
Long |
ttl(String key)
|
|
DataType |
type(byte[] key)
|
|
DataType |
type(String key)
|
|
void |
unwatch()
|
|
void |
watch(byte[]... keys)
|
|
Boolean |
zAdd(byte[] key,
double score,
byte[] value)
|
|
Long |
zAdd(byte[] key,
Set<RedisZSetCommands.Tuple> tuples)
|
|
Boolean |
zAdd(String key,
double score,
String value)
|
|
Long |
zAdd(String key,
Set<StringRedisConnection.StringTuple> tuples)
|
|
Long |
zCard(byte[] key)
|
|
Long |
zCard(String key)
|
|
Long |
zCount(byte[] key,
double min,
double max)
|
|
Long |
zCount(String key,
double min,
double max)
|
|
Double |
zIncrBy(byte[] key,
double increment,
byte[] value)
|
|
Double |
zIncrBy(String key,
double increment,
String value)
|
|
Long |
zInterStore(byte[] destKey,
byte[]... sets)
|
|
Long |
zInterStore(byte[] destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
byte[]... sets)
|
|
Long |
zInterStore(String destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
String... sets)
|
|
Long |
zInterStore(String destKey,
String... sets)
|
|
Set<byte[]> |
zRange(byte[] key,
long start,
long end)
|
|
Set<String> |
zRange(String key,
long start,
long end)
|
|
Set<byte[]> |
zRangeByScore(byte[] key,
double min,
double max)
|
|
Set<byte[]> |
zRangeByScore(byte[] key,
double min,
double max,
long offset,
long count)
|
|
Set<String> |
zRangeByScore(String key,
double min,
double max)
|
|
Set<String> |
zRangeByScore(String key,
double min,
double max,
long offset,
long count)
|
|
Set<RedisZSetCommands.Tuple> |
zRangeByScoreWithScores(byte[] key,
double min,
double max)
|
|
Set<RedisZSetCommands.Tuple> |
zRangeByScoreWithScores(byte[] 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<RedisZSetCommands.Tuple> |
zRangeWithScores(byte[] key,
long start,
long end)
|
|
Set<StringRedisConnection.StringTuple> |
zRangeWithScores(String key,
long start,
long end)
|
|
Long |
zRank(byte[] key,
byte[] value)
|
|
Long |
zRank(String key,
String value)
|
|
Long |
zRem(byte[] key,
byte[]... values)
|
|
Long |
zRem(String key,
String... values)
|
|
Long |
zRemRange(byte[] key,
long start,
long end)
|
|
Long |
zRemRange(String key,
long start,
long end)
|
|
Long |
zRemRangeByScore(byte[] key,
double min,
double max)
|
|
Long |
zRemRangeByScore(String key,
double min,
double max)
|
|
Set<byte[]> |
zRevRange(byte[] key,
long start,
long end)
|
|
Set<String> |
zRevRange(String key,
long start,
long end)
|
|
Set<byte[]> |
zRevRangeByScore(byte[] key,
double min,
double max)
|
|
Set<byte[]> |
zRevRangeByScore(byte[] key,
double min,
double max,
long offset,
long count)
|
|
Set<String> |
zRevRangeByScore(String key,
double min,
double max)
|
|
Set<String> |
zRevRangeByScore(String key,
double min,
double max,
long offset,
long count)
|
|
Set<RedisZSetCommands.Tuple> |
zRevRangeByScoreWithScores(byte[] key,
double min,
double max)
|
|
Set<RedisZSetCommands.Tuple> |
zRevRangeByScoreWithScores(byte[] 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<RedisZSetCommands.Tuple> |
zRevRangeWithScores(byte[] key,
long start,
long end)
|
|
Set<StringRedisConnection.StringTuple> |
zRevRangeWithScores(String key,
long start,
long end)
|
|
Long |
zRevRank(byte[] key,
byte[] value)
|
|
Long |
zRevRank(String key,
String value)
|
|
Double |
zScore(byte[] key,
byte[] value)
|
|
Double |
zScore(String key,
String value)
|
|
Long |
zUnionStore(byte[] destKey,
byte[]... sets)
|
|
Long |
zUnionStore(byte[] destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
byte[]... sets)
|
|
Long |
zUnionStore(String destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
String... sets)
|
|
Long |
zUnionStore(String destKey,
String... sets)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultStringRedisConnection(RedisConnection connection)
DefaultStringRedisConnection instance. Uses StringRedisSerializer as
underlying serializer.
connection - Redis connection
public DefaultStringRedisConnection(RedisConnection connection,
RedisSerializer<String> serializer)
DefaultStringRedisConnection instance.
connection - Redis connectionserializer - String serializer| Method Detail |
|---|
public Long append(byte[] key,
byte[] value)
append in interface RedisStringCommandspublic void bgSave()
bgSave in interface RedisServerCommandspublic void bgWriteAof()
bgWriteAof in interface RedisServerCommands
public List<byte[]> bLPop(int timeout,
byte[]... keys)
bLPop in interface RedisListCommands
public List<byte[]> bRPop(int timeout,
byte[]... keys)
bRPop in interface RedisListCommands
public byte[] bRPopLPush(int timeout,
byte[] srcKey,
byte[] dstKey)
bRPopLPush in interface RedisListCommands
public void close()
throws RedisSystemException
RedisConnection
close in interface RedisConnectionRedisSystemExceptionpublic Long dbSize()
dbSize in interface RedisServerCommandspublic Long decr(byte[] key)
decr in interface RedisStringCommands
public Long decrBy(byte[] key,
long value)
decrBy in interface RedisStringCommandspublic Long del(byte[]... keys)
del in interface RedisKeyCommandspublic void discard()
discard in interface RedisTxCommandspublic byte[] echo(byte[] message)
echo in interface RedisConnectionCommandspublic List<Object> exec()
exec in interface RedisTxCommandspublic Boolean exists(byte[] key)
exists in interface RedisKeyCommands
public Boolean expire(byte[] key,
long seconds)
expire in interface RedisKeyCommands
public Boolean expireAt(byte[] key,
long unixTime)
expireAt in interface RedisKeyCommandspublic void flushAll()
flushAll in interface RedisServerCommandspublic void flushDb()
flushDb in interface RedisServerCommandspublic byte[] get(byte[] key)
get in interface RedisStringCommands
public Boolean getBit(byte[] key,
long offset)
getBit in interface RedisStringCommandspublic List<String> getConfig(String pattern)
getConfig in interface RedisServerCommandspublic Object getNativeConnection()
RedisConnection
getNativeConnection in interface RedisConnection
public byte[] getRange(byte[] key,
long start,
long end)
getRange in interface RedisStringCommands
public byte[] getSet(byte[] key,
byte[] value)
getSet in interface RedisStringCommandspublic Subscription getSubscription()
RedisPubSubCommands
getSubscription in interface RedisPubSubCommands
public Long hDel(byte[] key,
byte[]... fields)
hDel in interface RedisHashCommands
public Boolean hExists(byte[] key,
byte[] field)
hExists in interface RedisHashCommands
public byte[] hGet(byte[] key,
byte[] field)
hGet in interface RedisHashCommandspublic Map<byte[],byte[]> hGetAll(byte[] key)
hGetAll in interface RedisHashCommands
public Long hIncrBy(byte[] key,
byte[] field,
long delta)
hIncrBy in interface RedisHashCommands
public Double hIncrBy(byte[] key,
byte[] field,
double delta)
hIncrBy in interface RedisHashCommandspublic Set<byte[]> hKeys(byte[] key)
hKeys in interface RedisHashCommandspublic Long hLen(byte[] key)
hLen in interface RedisHashCommands
public List<byte[]> hMGet(byte[] key,
byte[]... fields)
hMGet in interface RedisHashCommands
public void hMSet(byte[] key,
Map<byte[],byte[]> hashes)
hMSet in interface RedisHashCommands
public Boolean hSet(byte[] key,
byte[] field,
byte[] value)
hSet in interface RedisHashCommands
public Boolean hSetNX(byte[] key,
byte[] field,
byte[] value)
hSetNX in interface RedisHashCommandspublic List<byte[]> hVals(byte[] key)
hVals in interface RedisHashCommandspublic Long incr(byte[] key)
incr in interface RedisStringCommands
public Long incrBy(byte[] key,
long value)
incrBy in interface RedisStringCommands
public Double incrBy(byte[] key,
double value)
incrBy in interface RedisStringCommandspublic Properties info()
info in interface RedisServerCommandspublic Properties info(String section)
info in interface RedisServerCommandspublic boolean isClosed()
RedisConnection
isClosed in interface RedisConnectionpublic boolean isQueueing()
RedisConnection
isQueueing in interface RedisConnectionpublic boolean isSubscribed()
RedisPubSubCommands
isSubscribed in interface RedisPubSubCommandspublic Set<byte[]> keys(byte[] pattern)
keys in interface RedisKeyCommandspublic Long lastSave()
lastSave in interface RedisServerCommands
public byte[] lIndex(byte[] key,
long index)
lIndex in interface RedisListCommands
public Long lInsert(byte[] key,
RedisListCommands.Position where,
byte[] pivot,
byte[] value)
lInsert in interface RedisListCommandspublic Long lLen(byte[] key)
lLen in interface RedisListCommandspublic byte[] lPop(byte[] key)
lPop in interface RedisListCommands
public Long lPush(byte[] key,
byte[]... values)
lPush in interface RedisListCommands
public Long lPushX(byte[] key,
byte[] value)
lPushX in interface RedisListCommands
public List<byte[]> lRange(byte[] key,
long start,
long end)
lRange in interface RedisListCommands
public Long lRem(byte[] key,
long count,
byte[] value)
lRem in interface RedisListCommands
public void lSet(byte[] key,
long index,
byte[] value)
lSet in interface RedisListCommands
public void lTrim(byte[] key,
long start,
long end)
lTrim in interface RedisListCommandspublic List<byte[]> mGet(byte[]... keys)
mGet in interface RedisStringCommandspublic void mSet(Map<byte[],byte[]> tuple)
mSet in interface RedisStringCommandspublic Boolean mSetNX(Map<byte[],byte[]> tuple)
mSetNX in interface RedisStringCommandspublic void multi()
multi in interface RedisTxCommandspublic Boolean persist(byte[] key)
persist in interface RedisKeyCommands
public Boolean move(byte[] key,
int dbIndex)
move in interface RedisKeyCommandspublic String ping()
ping in interface RedisConnectionCommands
public void pSubscribe(MessageListener listener,
byte[]... patterns)
RedisPubSubCommands
pSubscribe in interface RedisPubSubCommandslistener - message listenerpatterns - channel name patterns
public Long publish(byte[] channel,
byte[] message)
RedisPubSubCommands
publish in interface RedisPubSubCommandschannel - the channel to publish tomessage - message to publish
public byte[] randomKey()
randomKey in interface RedisKeyCommands
public void rename(byte[] oldName,
byte[] newName)
rename in interface RedisKeyCommands
public Boolean renameNX(byte[] oldName,
byte[] newName)
renameNX in interface RedisKeyCommandspublic void resetConfigStats()
resetConfigStats in interface RedisServerCommandspublic byte[] rPop(byte[] key)
rPop in interface RedisListCommands
public byte[] rPopLPush(byte[] srcKey,
byte[] dstKey)
rPopLPush in interface RedisListCommands
public Long rPush(byte[] key,
byte[]... values)
rPush in interface RedisListCommands
public Long rPushX(byte[] key,
byte[] value)
rPushX in interface RedisListCommands
public Long sAdd(byte[] key,
byte[]... values)
sAdd in interface RedisSetCommandspublic void save()
save in interface RedisServerCommandspublic Long sCard(byte[] key)
sCard in interface RedisSetCommandspublic Set<byte[]> sDiff(byte[]... keys)
sDiff in interface RedisSetCommands
public Long sDiffStore(byte[] destKey,
byte[]... keys)
sDiffStore in interface RedisSetCommandspublic void select(int dbIndex)
select in interface RedisConnectionCommands
public void set(byte[] key,
byte[] value)
set in interface RedisStringCommands
public void setBit(byte[] key,
long offset,
boolean value)
setBit in interface RedisStringCommands
public void setConfig(String param,
String value)
setConfig in interface RedisServerCommands
public void setEx(byte[] key,
long seconds,
byte[] value)
setEx in interface RedisStringCommands
public Boolean setNX(byte[] key,
byte[] value)
setNX in interface RedisStringCommands
public void setRange(byte[] key,
byte[] value,
long start)
setRange in interface RedisStringCommandspublic void shutdown()
shutdown in interface RedisServerCommandspublic Set<byte[]> sInter(byte[]... keys)
sInter in interface RedisSetCommands
public Long sInterStore(byte[] destKey,
byte[]... keys)
sInterStore in interface RedisSetCommands
public Boolean sIsMember(byte[] key,
byte[] value)
sIsMember in interface RedisSetCommandspublic Set<byte[]> sMembers(byte[] key)
sMembers in interface RedisSetCommands
public Boolean sMove(byte[] srcKey,
byte[] destKey,
byte[] value)
sMove in interface RedisSetCommands
public Long sort(byte[] key,
SortParameters params,
byte[] storeKey)
sort in interface RedisKeyCommands
public List<byte[]> sort(byte[] key,
SortParameters params)
sort in interface RedisKeyCommandspublic byte[] sPop(byte[] key)
sPop in interface RedisSetCommandspublic byte[] sRandMember(byte[] key)
sRandMember in interface RedisSetCommands
public List<byte[]> sRandMember(byte[] key,
long count)
sRandMember in interface RedisSetCommands
public Long sRem(byte[] key,
byte[]... values)
sRem in interface RedisSetCommandspublic Long strLen(byte[] key)
strLen in interface RedisStringCommandspublic Long bitCount(byte[] key)
bitCount in interface RedisStringCommands
public Long bitCount(byte[] key,
long begin,
long end)
bitCount in interface RedisStringCommands
public Long bitOp(RedisStringCommands.BitOperation op,
byte[] destination,
byte[]... keys)
bitOp in interface RedisStringCommands
public void subscribe(MessageListener listener,
byte[]... channels)
RedisPubSubCommands
subscribe in interface RedisPubSubCommandslistener - message listenerchannels - channel namespublic Set<byte[]> sUnion(byte[]... keys)
sUnion in interface RedisSetCommands
public Long sUnionStore(byte[] destKey,
byte[]... keys)
sUnionStore in interface RedisSetCommandspublic Long ttl(byte[] key)
ttl in interface RedisKeyCommandspublic DataType type(byte[] key)
type in interface RedisKeyCommandspublic void unwatch()
unwatch in interface RedisTxCommandspublic void watch(byte[]... keys)
watch in interface RedisTxCommands
public Boolean zAdd(byte[] key,
double score,
byte[] value)
zAdd in interface RedisZSetCommands
public Long zAdd(byte[] key,
Set<RedisZSetCommands.Tuple> tuples)
zAdd in interface RedisZSetCommandspublic Long zCard(byte[] key)
zCard in interface RedisZSetCommands
public Long zCount(byte[] key,
double min,
double max)
zCount in interface RedisZSetCommands
public Double zIncrBy(byte[] key,
double increment,
byte[] value)
zIncrBy in interface RedisZSetCommands
public Long zInterStore(byte[] destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
byte[]... sets)
zInterStore in interface RedisZSetCommands
public Long zInterStore(byte[] destKey,
byte[]... sets)
zInterStore in interface RedisZSetCommands
public Set<byte[]> zRange(byte[] key,
long start,
long end)
zRange in interface RedisZSetCommands
public Set<byte[]> zRangeByScore(byte[] key,
double min,
double max,
long offset,
long count)
zRangeByScore in interface RedisZSetCommands
public Set<byte[]> zRangeByScore(byte[] key,
double min,
double max)
zRangeByScore in interface RedisZSetCommands
public Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key,
double min,
double max,
long offset,
long count)
zRangeByScoreWithScores in interface RedisZSetCommands
public Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key,
double min,
double max)
zRangeByScoreWithScores in interface RedisZSetCommands
public Set<RedisZSetCommands.Tuple> zRangeWithScores(byte[] key,
long start,
long end)
zRangeWithScores in interface RedisZSetCommands
public Set<byte[]> zRevRangeByScore(byte[] key,
double min,
double max,
long offset,
long count)
zRevRangeByScore in interface RedisZSetCommands
public Set<byte[]> zRevRangeByScore(byte[] key,
double min,
double max)
zRevRangeByScore in interface RedisZSetCommands
public Set<RedisZSetCommands.Tuple> zRevRangeByScoreWithScores(byte[] key,
double min,
double max,
long offset,
long count)
zRevRangeByScoreWithScores in interface RedisZSetCommands
public Set<RedisZSetCommands.Tuple> zRevRangeByScoreWithScores(byte[] key,
double min,
double max)
zRevRangeByScoreWithScores in interface RedisZSetCommands
public Long zRank(byte[] key,
byte[] value)
zRank in interface RedisZSetCommands
public Long zRem(byte[] key,
byte[]... values)
zRem in interface RedisZSetCommands
public Long zRemRange(byte[] key,
long start,
long end)
zRemRange in interface RedisZSetCommands
public Long zRemRangeByScore(byte[] key,
double min,
double max)
zRemRangeByScore in interface RedisZSetCommands
public Set<byte[]> zRevRange(byte[] key,
long start,
long end)
zRevRange in interface RedisZSetCommands
public Set<RedisZSetCommands.Tuple> zRevRangeWithScores(byte[] key,
long start,
long end)
zRevRangeWithScores in interface RedisZSetCommands
public Long zRevRank(byte[] key,
byte[] value)
zRevRank in interface RedisZSetCommands
public Double zScore(byte[] key,
byte[] value)
zScore in interface RedisZSetCommands
public Long zUnionStore(byte[] destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
byte[]... sets)
zUnionStore in interface RedisZSetCommands
public Long zUnionStore(byte[] destKey,
byte[]... sets)
zUnionStore in interface RedisZSetCommands
public Boolean pExpire(byte[] key,
long millis)
pExpire in interface RedisKeyCommands
public Boolean pExpireAt(byte[] key,
long unixTimeInMillis)
pExpireAt in interface RedisKeyCommandspublic Long pTtl(byte[] key)
pTtl in interface RedisKeyCommandspublic byte[] dump(byte[] key)
dump in interface RedisKeyCommands
public void restore(byte[] key,
long ttlInMillis,
byte[] serializedValue)
restore in interface RedisKeyCommandspublic void scriptFlush()
scriptFlush in interface RedisScriptingCommandspublic void scriptKill()
scriptKill in interface RedisScriptingCommandspublic String scriptLoad(byte[] script)
scriptLoad in interface RedisScriptingCommandspublic List<Boolean> scriptExists(String... scriptSha1)
scriptExists in interface RedisScriptingCommands
public <T> T eval(byte[] script,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
eval in interface RedisScriptingCommands
public <T> T evalSha(String scriptSha1,
ReturnType returnType,
int numKeys,
byte[]... keysAndArgs)
evalSha in interface RedisScriptingCommands
public Long append(String key,
String value)
append in interface StringRedisConnection
public List<String> bLPop(int timeout,
String... keys)
bLPop in interface StringRedisConnection
public List<String> bRPop(int timeout,
String... keys)
bRPop in interface StringRedisConnection
public String bRPopLPush(int timeout,
String srcKey,
String dstKey)
bRPopLPush in interface StringRedisConnectionpublic Long decr(String key)
decr in interface StringRedisConnection
public Long decrBy(String key,
long value)
decrBy in interface StringRedisConnectionpublic Long del(String... keys)
del in interface StringRedisConnectionpublic String echo(String message)
echo in interface StringRedisConnectionpublic Boolean exists(String key)
exists in interface StringRedisConnection
public Boolean expire(String key,
long seconds)
expire in interface StringRedisConnection
public Boolean expireAt(String key,
long unixTime)
expireAt in interface StringRedisConnectionpublic String get(String key)
get in interface StringRedisConnection
public Boolean getBit(String key,
long offset)
getBit in interface StringRedisConnection
public String getRange(String key,
long start,
long end)
getRange in interface StringRedisConnection
public String getSet(String key,
String value)
getSet in interface StringRedisConnection
public Long hDel(String key,
String... fields)
hDel in interface StringRedisConnection
public Boolean hExists(String key,
String field)
hExists in interface StringRedisConnection
public String hGet(String key,
String field)
hGet in interface StringRedisConnectionpublic Map<String,String> hGetAll(String key)
hGetAll in interface StringRedisConnection
public Long hIncrBy(String key,
String field,
long delta)
hIncrBy in interface StringRedisConnection
public Double hIncrBy(String key,
String field,
double delta)
hIncrBy in interface StringRedisConnectionpublic Set<String> hKeys(String key)
hKeys in interface StringRedisConnectionpublic Long hLen(String key)
hLen in interface StringRedisConnection
public List<String> hMGet(String key,
String... fields)
hMGet in interface StringRedisConnection
public void hMSet(String key,
Map<String,String> hashes)
hMSet in interface StringRedisConnection
public Boolean hSet(String key,
String field,
String value)
hSet in interface StringRedisConnection
public Boolean hSetNX(String key,
String field,
String value)
hSetNX in interface StringRedisConnectionpublic List<String> hVals(String key)
hVals in interface StringRedisConnectionpublic Long incr(String key)
incr in interface StringRedisConnection
public Long incrBy(String key,
long value)
incrBy in interface StringRedisConnection
public Double incrBy(String key,
double value)
incrBy in interface StringRedisConnectionpublic Collection<String> keys(String pattern)
keys in interface StringRedisConnection
public String lIndex(String key,
long index)
lIndex in interface StringRedisConnection
public Long lInsert(String key,
RedisListCommands.Position where,
String pivot,
String value)
lInsert in interface StringRedisConnectionpublic Long lLen(String key)
lLen in interface StringRedisConnectionpublic String lPop(String key)
lPop in interface StringRedisConnection
public Long lPush(String key,
String... values)
lPush in interface StringRedisConnection
public Long lPushX(String key,
String value)
lPushX in interface StringRedisConnection
public List<String> lRange(String key,
long start,
long end)
lRange in interface StringRedisConnection
public Long lRem(String key,
long count,
String value)
lRem in interface StringRedisConnection
public void lSet(String key,
long index,
String value)
lSet in interface StringRedisConnection
public void lTrim(String key,
long start,
long end)
lTrim in interface StringRedisConnectionpublic List<String> mGet(String... keys)
mGet in interface StringRedisConnectionpublic Boolean mSetNXString(Map<String,String> tuple)
mSetNXString in interface StringRedisConnectionpublic void mSetString(Map<String,String> tuple)
mSetString in interface StringRedisConnectionpublic Boolean persist(String key)
persist in interface StringRedisConnection
public Boolean move(String key,
int dbIndex)
move in interface StringRedisConnection
public void pSubscribe(MessageListener listener,
String... patterns)
pSubscribe in interface StringRedisConnection
public Long publish(String channel,
String message)
publish in interface StringRedisConnection
public void rename(String oldName,
String newName)
rename in interface StringRedisConnection
public Boolean renameNX(String oldName,
String newName)
renameNX in interface StringRedisConnectionpublic String rPop(String key)
rPop in interface StringRedisConnection
public String rPopLPush(String srcKey,
String dstKey)
rPopLPush in interface StringRedisConnection
public Long rPush(String key,
String... values)
rPush in interface StringRedisConnection
public Long rPushX(String key,
String value)
rPushX in interface StringRedisConnection
public Long sAdd(String key,
String... values)
sAdd in interface StringRedisConnectionpublic Long sCard(String key)
sCard in interface StringRedisConnectionpublic Set<String> sDiff(String... keys)
sDiff in interface StringRedisConnection
public Long sDiffStore(String destKey,
String... keys)
sDiffStore in interface StringRedisConnection
public void set(String key,
String value)
set in interface StringRedisConnection
public void setBit(String key,
long offset,
boolean value)
setBit in interface StringRedisConnection
public void setEx(String key,
long seconds,
String value)
setEx in interface StringRedisConnection
public Boolean setNX(String key,
String value)
setNX in interface StringRedisConnection
public void setRange(String key,
String value,
long start)
setRange in interface StringRedisConnectionpublic Set<String> sInter(String... keys)
sInter in interface StringRedisConnection
public Long sInterStore(String destKey,
String... keys)
sInterStore in interface StringRedisConnection
public Boolean sIsMember(String key,
String value)
sIsMember in interface StringRedisConnectionpublic Set<String> sMembers(String key)
sMembers in interface StringRedisConnection
public Boolean sMove(String srcKey,
String destKey,
String value)
sMove in interface StringRedisConnection
public Long sort(String key,
SortParameters params,
String storeKey)
sort in interface StringRedisConnection
public List<String> sort(String key,
SortParameters params)
sort in interface StringRedisConnectionpublic String sPop(String key)
sPop in interface StringRedisConnectionpublic String sRandMember(String key)
sRandMember in interface StringRedisConnection
public List<String> sRandMember(String key,
long count)
sRandMember in interface StringRedisConnection
public Long sRem(String key,
String... values)
sRem in interface StringRedisConnectionpublic Long strLen(String key)
strLen in interface StringRedisConnectionpublic Long bitCount(String key)
bitCount in interface StringRedisConnection
public Long bitCount(String key,
long begin,
long end)
bitCount in interface StringRedisConnection
public Long bitOp(RedisStringCommands.BitOperation op,
String destination,
String... keys)
bitOp in interface StringRedisConnection
public void subscribe(MessageListener listener,
String... channels)
subscribe in interface StringRedisConnectionpublic Set<String> sUnion(String... keys)
sUnion in interface StringRedisConnection
public Long sUnionStore(String destKey,
String... keys)
sUnionStore in interface StringRedisConnectionpublic Long ttl(String key)
ttl in interface StringRedisConnectionpublic DataType type(String key)
type in interface StringRedisConnection
public Boolean zAdd(String key,
double score,
String value)
zAdd in interface StringRedisConnection
public Long zAdd(String key,
Set<StringRedisConnection.StringTuple> tuples)
zAdd in interface StringRedisConnectionpublic Long zCard(String key)
zCard in interface StringRedisConnection
public Long zCount(String key,
double min,
double max)
zCount in interface StringRedisConnection
public Double zIncrBy(String key,
double increment,
String value)
zIncrBy in interface StringRedisConnection
public Long zInterStore(String destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
String... sets)
zInterStore in interface StringRedisConnection
public Long zInterStore(String destKey,
String... sets)
zInterStore in interface StringRedisConnection
public Set<String> zRange(String key,
long start,
long end)
zRange in interface StringRedisConnection
public Set<String> zRangeByScore(String key,
double min,
double max,
long offset,
long count)
zRangeByScore in interface StringRedisConnection
public Set<String> zRangeByScore(String key,
double min,
double max)
zRangeByScore in interface StringRedisConnection
public Set<StringRedisConnection.StringTuple> zRangeByScoreWithScores(String key,
double min,
double max,
long offset,
long count)
zRangeByScoreWithScores in interface StringRedisConnection
public Set<StringRedisConnection.StringTuple> zRangeByScoreWithScores(String key,
double min,
double max)
zRangeByScoreWithScores in interface StringRedisConnection
public Set<StringRedisConnection.StringTuple> zRangeWithScores(String key,
long start,
long end)
zRangeWithScores in interface StringRedisConnection
public Long zRank(String key,
String value)
zRank in interface StringRedisConnection
public Long zRem(String key,
String... values)
zRem in interface StringRedisConnection
public Long zRemRange(String key,
long start,
long end)
zRemRange in interface StringRedisConnection
public Long zRemRangeByScore(String key,
double min,
double max)
zRemRangeByScore in interface StringRedisConnection
public Set<String> zRevRange(String key,
long start,
long end)
zRevRange in interface StringRedisConnection
public Set<StringRedisConnection.StringTuple> zRevRangeWithScores(String key,
long start,
long end)
zRevRangeWithScores in interface StringRedisConnection
public Set<String> zRevRangeByScore(String key,
double min,
double max)
zRevRangeByScore in interface StringRedisConnection
public Set<StringRedisConnection.StringTuple> zRevRangeByScoreWithScores(String key,
double min,
double max)
zRevRangeByScoreWithScores in interface StringRedisConnection
public Set<String> zRevRangeByScore(String key,
double min,
double max,
long offset,
long count)
zRevRangeByScore in interface StringRedisConnection
public Set<StringRedisConnection.StringTuple> zRevRangeByScoreWithScores(String key,
double min,
double max,
long offset,
long count)
zRevRangeByScoreWithScores in interface StringRedisConnection
public Long zRevRank(String key,
String value)
zRevRank in interface StringRedisConnection
public Double zScore(String key,
String value)
zScore in interface StringRedisConnection
public Long zUnionStore(String destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
String... sets)
zUnionStore in interface StringRedisConnection
public Long zUnionStore(String destKey,
String... sets)
zUnionStore in interface StringRedisConnectionpublic List<Object> closePipeline()
RedisConnection
closePipeline in interface RedisConnectionpublic boolean isPipelined()
RedisConnection
isPipelined in interface RedisConnectionRedisConnection.openPipeline(),
RedisConnection.isQueueing()public void openPipeline()
RedisConnectionRedisConnection.closePipeline(). Calling this method when the connection is already pipelined has no effect.
Pipelining is used for issuing commands without requesting the response right away but rather at the end of the
batch. While somewhat similar to MULTI, pipelining does not guarantee atomicity - it only tries to improve
performance when issuing a lot of commands (such as in batching scenarios).
Note:
Consider doing some performance testing before using this feature since in many cases the performance benefits are minimal yet the impact on usage are not.
openPipeline in interface RedisConnectionRedisTxCommands.multi()public Object execute(String command)
execute in interface StringRedisConnection
public Object execute(String command,
byte[]... args)
RedisCommands
execute in interface RedisCommandscommand - Command to executeargs - Possible command arguments (may be null)
public Object execute(String command,
String... args)
execute in interface StringRedisConnection
public Boolean pExpire(String key,
long millis)
pExpire in interface StringRedisConnection
public Boolean pExpireAt(String key,
long unixTimeInMillis)
pExpireAt in interface StringRedisConnectionpublic Long pTtl(String key)
pTtl in interface StringRedisConnectionpublic String scriptLoad(String script)
scriptLoad in interface StringRedisConnection
public <T> T eval(String script,
ReturnType returnType,
int numKeys,
String... keysAndArgs)
eval in interface StringRedisConnection
public <T> T evalSha(String scriptSha1,
ReturnType returnType,
int numKeys,
String... keysAndArgs)
evalSha in interface StringRedisConnectionpublic void setDeserializePipelineAndTxResults(boolean deserializePipelineAndTxResults)
closePipeline() and exec() will be of the type returned by the underlying connection
deserializePipelineAndTxResults - Whether or not to deserialize pipeline and tx results
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||