org.idevlab.rjc
Class Client
java.lang.Object
org.idevlab.rjc.Client
- All Implemented Interfaces:
- MultiExecCommands, RedisCommands
public class Client
- extends Object
- implements RedisCommands
|
Method Summary |
void |
append(String key,
String value)
|
void |
auth(String password)
|
void |
bgrewriteaof()
|
void |
bgsave()
|
void |
blpop(String... args)
|
void |
brpop(String... keys)
|
void |
brpoplpush(String source,
String destination,
int timeout)
|
void |
close()
Closes underlying connection |
void |
configGet(String pattern)
|
void |
configResetStat()
|
void |
configSet(String parameter,
String value)
|
void |
dbSize()
|
void |
debug(DebugParams params)
|
void |
decr(String key)
|
void |
decrBy(String key,
int integer)
|
void |
del(String... keys)
|
void |
discard()
|
void |
echo(String string)
|
void |
exec()
|
void |
exists(String key)
|
void |
expire(String key,
int seconds)
|
void |
expireAt(String key,
long unixTime)
|
void |
flushAll()
|
void |
flushDB()
|
void |
get(String key)
|
List<Object> |
getAll()
|
void |
getbit(String key,
int offset)
|
String |
getBulkReply()
|
Long |
getIntegerReply()
|
List<String> |
getMultiBulkReply()
|
List<Object> |
getObjectMultiBulkReply()
|
Object |
getOne()
|
void |
getRange(String key,
int start,
int end)
|
void |
getSet(String key,
String value)
|
String |
getStatusCodeReply()
|
void |
hdel(String key,
String field)
|
void |
hexists(String key,
String field)
|
void |
hget(String key,
String field)
|
void |
hgetAll(String key)
|
void |
hincrBy(String key,
String field,
int value)
|
void |
hkeys(String key)
|
void |
hlen(String key)
|
void |
hmget(String key,
String... fields)
|
void |
hmset(String key,
Map<String,String> hash)
|
void |
hset(String key,
String field,
String value)
|
void |
hsetnx(String key,
String field,
String value)
|
void |
hvals(String key)
|
void |
incr(String key)
|
void |
incrBy(String key,
int integer)
|
void |
info()
|
boolean |
isConnected()
|
boolean |
isInMulti()
|
void |
keys(String pattern)
|
void |
lastsave()
|
void |
lindex(String key,
int index)
|
void |
linsert(String key,
Client.LIST_POSITION where,
String pivot,
String value)
|
void |
llen(String key)
|
void |
lpop(String key)
|
void |
lpush(String key,
String string)
|
void |
lpushx(String key,
String string)
|
void |
lrange(String key,
int start,
int end)
|
void |
lrem(String key,
int count,
String value)
|
void |
lset(String key,
int index,
String value)
|
void |
ltrim(String key,
int start,
int end)
|
void |
mget(String... keys)
|
void |
monitor()
|
void |
move(String key,
int dbIndex)
|
void |
mset(String... keysvalues)
|
void |
msetnx(String... keysvalues)
|
void |
multi()
|
void |
persist(String key)
|
void |
ping()
|
void |
psubscribe(String... pattern)
|
void |
publish(String channel,
String message)
|
void |
punsubscribe()
|
void |
punsubscribe(String... patterns)
|
void |
quit()
|
void |
randomKey()
|
void |
rename(String oldkey,
String newkey)
|
void |
renamenx(String oldkey,
String newkey)
|
void |
rollbackTimeout()
|
void |
rpop(String key)
|
void |
rpoplpush(String srckey,
String dstkey)
|
void |
rpush(String key,
String string)
|
void |
rpushx(String key,
String string)
|
void |
sadd(String key,
String member)
|
void |
save()
|
void |
scard(String key)
|
void |
sdiff(String... keys)
|
void |
sdiffstore(String dstkey,
String... keys)
|
void |
select(int index)
|
void |
set(String key,
String value)
|
void |
setbit(String key,
int offset,
String value)
|
void |
setex(String key,
int seconds,
String value)
|
void |
setnx(String key,
String value)
|
void |
setRange(String key,
int offset,
String value)
|
void |
setTimeoutInfinite()
|
void |
shutdown()
|
void |
sinter(String... keys)
|
void |
sinterstore(String dstkey,
String... keys)
|
void |
sismember(String key,
String member)
|
void |
slaveof(String host,
int port)
|
void |
slaveofNoOne()
|
void |
smembers(String key)
|
void |
smove(String srckey,
String dstkey,
String member)
|
void |
sort(String key)
|
void |
sort(String key,
SortingParams sortingParameters)
|
void |
sort(String key,
SortingParams sortingParameters,
String dstkey)
|
void |
sort(String key,
String dstkey)
|
void |
spop(String key)
|
void |
srandmember(String key)
|
void |
srem(String key,
String member)
|
void |
strlen(String key)
|
void |
subscribe(String... channels)
|
void |
sunion(String... keys)
|
void |
sunionstore(String dstkey,
String... keys)
|
void |
sync()
|
void |
ttl(String key)
|
void |
type(String key)
|
void |
unsubscribe()
|
void |
unsubscribe(String... channels)
|
void |
unwatch()
|
void |
watch(String... keys)
|
void |
zadd(String key,
Number score,
String member)
|
void |
zcard(String key)
|
void |
zcount(String key,
Number min,
Number max)
|
void |
zincrby(String key,
Number score,
String member)
|
void |
zinterstore(String dstkey,
String... sets)
|
void |
zinterstore(String dstkey,
ZParams params,
String... sets)
|
void |
zrange(String key,
int start,
int end)
|
void |
zrangeByScore(String key,
String min,
String max)
|
void |
zrangeByScore(String key,
String min,
String max,
int offset,
int count)
|
void |
zrangeByScoreWithScores(String key,
String min,
String max)
|
void |
zrangeByScoreWithScores(String key,
String min,
String max,
int offset,
int count)
|
void |
zrangeWithScores(String key,
int start,
int end)
|
void |
zrank(String key,
String member)
|
void |
zrem(String key,
String member)
|
void |
zremrangeByRank(String key,
int start,
int end)
|
void |
zremrangeByScore(String key,
String start,
String end)
|
void |
zrevrange(String key,
int start,
int end)
|
void |
zrevrangeByScore(String key,
String max,
String min)
|
void |
zrevrangeByScore(String key,
String max,
String min,
int offset,
int count)
|
void |
zrevrangeByScoreWithScores(String key,
String max,
String min)
|
void |
zrevrangeByScoreWithScores(String key,
String max,
String min,
int offset,
int count)
|
void |
zrevrangeWithScores(String key,
int start,
int end)
|
void |
zrevrank(String key,
String member)
|
void |
zscore(String key,
String member)
|
void |
zunionstore(String dstkey,
String... sets)
|
void |
zunionstore(String dstkey,
ZParams params,
String... sets)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Client
public Client(RedisConnection conn)
close
public void close()
- Closes underlying connection
isInMulti
public boolean isInMulti()
ping
public void ping()
set
public void set(String key,
String value)
- Specified by:
set in interface RedisCommands
get
public void get(String key)
- Specified by:
get in interface RedisCommands
quit
public void quit()
exists
public void exists(String key)
- Specified by:
exists in interface RedisCommands
del
public void del(String... keys)
- Specified by:
del in interface RedisCommands
type
public void type(String key)
- Specified by:
type in interface RedisCommands
flushDB
public void flushDB()
keys
public void keys(String pattern)
- Specified by:
keys in interface RedisCommands
randomKey
public void randomKey()
rename
public void rename(String oldkey,
String newkey)
- Specified by:
rename in interface RedisCommands
renamenx
public void renamenx(String oldkey,
String newkey)
- Specified by:
renamenx in interface RedisCommands
dbSize
public void dbSize()
expire
public void expire(String key,
int seconds)
- Specified by:
expire in interface RedisCommands
expireAt
public void expireAt(String key,
long unixTime)
- Specified by:
expireAt in interface RedisCommands
ttl
public void ttl(String key)
- Specified by:
ttl in interface RedisCommands
select
public void select(int index)
- Specified by:
select in interface RedisCommands
move
public void move(String key,
int dbIndex)
- Specified by:
move in interface RedisCommands
flushAll
public void flushAll()
getSet
public void getSet(String key,
String value)
- Specified by:
getSet in interface RedisCommands
mget
public void mget(String... keys)
- Specified by:
mget in interface RedisCommands
setnx
public void setnx(String key,
String value)
- Specified by:
setnx in interface RedisCommands
setex
public void setex(String key,
int seconds,
String value)
- Specified by:
setex in interface RedisCommands
mset
public void mset(String... keysvalues)
- Specified by:
mset in interface RedisCommands
msetnx
public void msetnx(String... keysvalues)
- Specified by:
msetnx in interface RedisCommands
decrBy
public void decrBy(String key,
int integer)
- Specified by:
decrBy in interface RedisCommands
decr
public void decr(String key)
- Specified by:
decr in interface RedisCommands
incrBy
public void incrBy(String key,
int integer)
- Specified by:
incrBy in interface RedisCommands
incr
public void incr(String key)
- Specified by:
incr in interface RedisCommands
append
public void append(String key,
String value)
- Specified by:
append in interface RedisCommands
getRange
public void getRange(String key,
int start,
int end)
- Specified by:
getRange in interface RedisCommands
setRange
public void setRange(String key,
int offset,
String value)
- Specified by:
setRange in interface RedisCommands
hset
public void hset(String key,
String field,
String value)
- Specified by:
hset in interface RedisCommands
hget
public void hget(String key,
String field)
- Specified by:
hget in interface RedisCommands
hsetnx
public void hsetnx(String key,
String field,
String value)
- Specified by:
hsetnx in interface RedisCommands
hmset
public void hmset(String key,
Map<String,String> hash)
- Specified by:
hmset in interface RedisCommands
hmget
public void hmget(String key,
String... fields)
- Specified by:
hmget in interface RedisCommands
hincrBy
public void hincrBy(String key,
String field,
int value)
- Specified by:
hincrBy in interface RedisCommands
hexists
public void hexists(String key,
String field)
- Specified by:
hexists in interface RedisCommands
hdel
public void hdel(String key,
String field)
- Specified by:
hdel in interface RedisCommands
hlen
public void hlen(String key)
- Specified by:
hlen in interface RedisCommands
hkeys
public void hkeys(String key)
- Specified by:
hkeys in interface RedisCommands
hvals
public void hvals(String key)
- Specified by:
hvals in interface RedisCommands
hgetAll
public void hgetAll(String key)
- Specified by:
hgetAll in interface RedisCommands
rpush
public void rpush(String key,
String string)
- Specified by:
rpush in interface RedisCommands
lpush
public void lpush(String key,
String string)
- Specified by:
lpush in interface RedisCommands
llen
public void llen(String key)
- Specified by:
llen in interface RedisCommands
lrange
public void lrange(String key,
int start,
int end)
- Specified by:
lrange in interface RedisCommands
ltrim
public void ltrim(String key,
int start,
int end)
- Specified by:
ltrim in interface RedisCommands
lindex
public void lindex(String key,
int index)
- Specified by:
lindex in interface RedisCommands
lset
public void lset(String key,
int index,
String value)
- Specified by:
lset in interface RedisCommands
lrem
public void lrem(String key,
int count,
String value)
- Specified by:
lrem in interface RedisCommands
lpop
public void lpop(String key)
- Specified by:
lpop in interface RedisCommands
rpop
public void rpop(String key)
- Specified by:
rpop in interface RedisCommands
rpoplpush
public void rpoplpush(String srckey,
String dstkey)
- Specified by:
rpoplpush in interface RedisCommands
sadd
public void sadd(String key,
String member)
- Specified by:
sadd in interface RedisCommands
smembers
public void smembers(String key)
- Specified by:
smembers in interface RedisCommands
srem
public void srem(String key,
String member)
- Specified by:
srem in interface RedisCommands
spop
public void spop(String key)
- Specified by:
spop in interface RedisCommands
smove
public void smove(String srckey,
String dstkey,
String member)
- Specified by:
smove in interface RedisCommands
scard
public void scard(String key)
- Specified by:
scard in interface RedisCommands
sismember
public void sismember(String key,
String member)
- Specified by:
sismember in interface RedisCommands
sinter
public void sinter(String... keys)
- Specified by:
sinter in interface RedisCommands
sinterstore
public void sinterstore(String dstkey,
String... keys)
- Specified by:
sinterstore in interface RedisCommands
sunion
public void sunion(String... keys)
- Specified by:
sunion in interface RedisCommands
sunionstore
public void sunionstore(String dstkey,
String... keys)
- Specified by:
sunionstore in interface RedisCommands
sdiff
public void sdiff(String... keys)
- Specified by:
sdiff in interface RedisCommands
sdiffstore
public void sdiffstore(String dstkey,
String... keys)
- Specified by:
sdiffstore in interface RedisCommands
srandmember
public void srandmember(String key)
- Specified by:
srandmember in interface RedisCommands
zadd
public void zadd(String key,
Number score,
String member)
- Specified by:
zadd in interface RedisCommands
zrange
public void zrange(String key,
int start,
int end)
- Specified by:
zrange in interface RedisCommands
zrem
public void zrem(String key,
String member)
- Specified by:
zrem in interface RedisCommands
zincrby
public void zincrby(String key,
Number score,
String member)
- Specified by:
zincrby in interface RedisCommands
zrank
public void zrank(String key,
String member)
- Specified by:
zrank in interface RedisCommands
zrevrank
public void zrevrank(String key,
String member)
- Specified by:
zrevrank in interface RedisCommands
zrevrange
public void zrevrange(String key,
int start,
int end)
- Specified by:
zrevrange in interface RedisCommands
zrangeWithScores
public void zrangeWithScores(String key,
int start,
int end)
- Specified by:
zrangeWithScores in interface RedisCommands
zrevrangeWithScores
public void zrevrangeWithScores(String key,
int start,
int end)
- Specified by:
zrevrangeWithScores in interface RedisCommands
zrevrangeByScore
public void zrevrangeByScore(String key,
String max,
String min)
- Specified by:
zrevrangeByScore in interface RedisCommands
zrevrangeByScore
public void zrevrangeByScore(String key,
String max,
String min,
int offset,
int count)
- Specified by:
zrevrangeByScore in interface RedisCommands
zrevrangeByScoreWithScores
public void zrevrangeByScoreWithScores(String key,
String max,
String min)
- Specified by:
zrevrangeByScoreWithScores in interface RedisCommands
zrevrangeByScoreWithScores
public void zrevrangeByScoreWithScores(String key,
String max,
String min,
int offset,
int count)
- Specified by:
zrevrangeByScoreWithScores in interface RedisCommands
zcard
public void zcard(String key)
- Specified by:
zcard in interface RedisCommands
zscore
public void zscore(String key,
String member)
- Specified by:
zscore in interface RedisCommands
multi
public void multi()
- Specified by:
multi in interface MultiExecCommands
discard
public void discard()
- Specified by:
discard in interface MultiExecCommands
exec
public void exec()
- Specified by:
exec in interface MultiExecCommands
watch
public void watch(String... keys)
- Specified by:
watch in interface MultiExecCommands
unwatch
public void unwatch()
- Specified by:
unwatch in interface MultiExecCommands
sort
public void sort(String key)
- Specified by:
sort in interface RedisCommands
sort
public void sort(String key,
SortingParams sortingParameters)
- Specified by:
sort in interface RedisCommands
blpop
public void blpop(String... args)
- Specified by:
blpop in interface RedisCommands
sort
public void sort(String key,
SortingParams sortingParameters,
String dstkey)
- Specified by:
sort in interface RedisCommands
sort
public void sort(String key,
String dstkey)
- Specified by:
sort in interface RedisCommands
brpop
public void brpop(String... keys)
- Specified by:
brpop in interface RedisCommands
auth
public void auth(String password)
subscribe
public void subscribe(String... channels)
publish
public void publish(String channel,
String message)
unsubscribe
public void unsubscribe()
unsubscribe
public void unsubscribe(String... channels)
psubscribe
public void psubscribe(String... pattern)
punsubscribe
public void punsubscribe()
punsubscribe
public void punsubscribe(String... patterns)
zcount
public void zcount(String key,
Number min,
Number max)
- Specified by:
zcount in interface RedisCommands
zrangeByScore
public void zrangeByScore(String key,
String min,
String max)
- Specified by:
zrangeByScore in interface RedisCommands
zrangeByScore
public void zrangeByScore(String key,
String min,
String max,
int offset,
int count)
- Specified by:
zrangeByScore in interface RedisCommands
zrangeByScoreWithScores
public void zrangeByScoreWithScores(String key,
String min,
String max)
- Specified by:
zrangeByScoreWithScores in interface RedisCommands
zrangeByScoreWithScores
public void zrangeByScoreWithScores(String key,
String min,
String max,
int offset,
int count)
- Specified by:
zrangeByScoreWithScores in interface RedisCommands
zremrangeByRank
public void zremrangeByRank(String key,
int start,
int end)
- Specified by:
zremrangeByRank in interface RedisCommands
zremrangeByScore
public void zremrangeByScore(String key,
String start,
String end)
- Specified by:
zremrangeByScore in interface RedisCommands
zunionstore
public void zunionstore(String dstkey,
String... sets)
- Specified by:
zunionstore in interface RedisCommands
zunionstore
public void zunionstore(String dstkey,
ZParams params,
String... sets)
- Specified by:
zunionstore in interface RedisCommands
zinterstore
public void zinterstore(String dstkey,
String... sets)
- Specified by:
zinterstore in interface RedisCommands
zinterstore
public void zinterstore(String dstkey,
ZParams params,
String... sets)
- Specified by:
zinterstore in interface RedisCommands
save
public void save()
bgsave
public void bgsave()
bgrewriteaof
public void bgrewriteaof()
lastsave
public void lastsave()
shutdown
public void shutdown()
info
public void info()
monitor
public void monitor()
slaveof
public void slaveof(String host,
int port)
slaveofNoOne
public void slaveofNoOne()
configGet
public void configGet(String pattern)
configSet
public void configSet(String parameter,
String value)
strlen
public void strlen(String key)
- Specified by:
strlen in interface RedisCommands
sync
public void sync()
lpushx
public void lpushx(String key,
String string)
- Specified by:
lpushx in interface RedisCommands
persist
public void persist(String key)
- Specified by:
persist in interface RedisCommands
rpushx
public void rpushx(String key,
String string)
- Specified by:
rpushx in interface RedisCommands
echo
public void echo(String string)
linsert
public void linsert(String key,
Client.LIST_POSITION where,
String pivot,
String value)
debug
public void debug(DebugParams params)
- Specified by:
debug in interface RedisCommands
configResetStat
public void configResetStat()
- Specified by:
configResetStat in interface RedisCommands
brpoplpush
public void brpoplpush(String source,
String destination,
int timeout)
- Specified by:
brpoplpush in interface RedisCommands
setbit
public void setbit(String key,
int offset,
String value)
- Specified by:
setbit in interface RedisCommands
getbit
public void getbit(String key,
int offset)
- Specified by:
getbit in interface RedisCommands
getStatusCodeReply
public String getStatusCodeReply()
getBulkReply
public String getBulkReply()
getIntegerReply
public Long getIntegerReply()
getMultiBulkReply
public List<String> getMultiBulkReply()
getObjectMultiBulkReply
public List<Object> getObjectMultiBulkReply()
getAll
public List<Object> getAll()
getOne
public Object getOne()
isConnected
public boolean isConnected()
setTimeoutInfinite
public void setTimeoutInfinite()
rollbackTimeout
public void rollbackTimeout()
Copyright © 2011. All Rights Reserved.