public abstract class JRedisSupport extends Object implements JRedis
Modifier and Type | Field and Description |
---|---|
static boolean |
CacheKeys |
Constructor and Description |
---|
JRedisSupport() |
Modifier and Type | Method and Description |
---|---|
<K> long |
append(K key,
byte[] value) |
<K> long |
append(K key,
Number value) |
<K> long |
append(K key,
String value) |
<K,T extends Serializable> |
append(K key,
T value) |
<K> String |
bgrewriteaof() |
<K> void |
bgsave() |
<K> long |
dbsize() |
<K> ObjectInfo |
debug(K key) |
<K> long |
decr(K key) |
<K> long |
decrby(K key,
int delta) |
<K> long |
del(K... keys) |
<K> JRedis |
discard() |
<K> byte[] |
echo(byte[] value) |
<K> byte[] |
echo(Number value) |
<K> byte[] |
echo(String value) |
<K,T extends Serializable> |
echo(T value) |
<K> boolean |
exists(K key) |
<K> boolean |
expire(K key,
int ttlseconds) |
<K> boolean |
expireat(K key,
long epochtime) |
<K> JRedis |
flushall()
Flushes all dbs in the connect Redis server, regardless of which db was selected
on connect time.
|
<K> JRedis |
flushdb()
Flushes the db you selected when connecting to Redis server.
|
<K> byte[] |
get(K key) |
<K> boolean |
getbit(K key,
int offset) |
static <K> byte[] |
getKeyBytes(K key) |
<K> byte[] |
getset(K key,
byte[] value) |
<K> byte[] |
getset(K key,
Number value) |
<K> byte[] |
getset(K key,
String value) |
<K,T extends Serializable> |
getset(K key,
T value) |
<K> boolean |
hdel(K hashKey,
K hashField) |
<K> boolean |
hexists(K hashKey,
K hashField) |
<K> byte[] |
hget(K hashKey,
K hashField) |
<K> Map<byte[],byte[]> |
hgetall(K hashKey) |
<K> List<byte[]> |
hkeys(K hashKey) |
<K> long |
hlen(K hashKey) |
<K> boolean |
hset(K hashKey,
K hashField,
byte[] value) |
<K> boolean |
hset(K key,
K field,
Number numberValue) |
<K> boolean |
hset(K key,
K field,
String stringValue) |
<K,T extends Serializable> |
hset(K key,
K field,
T object) |
<K> List<byte[]> |
hvals(K hashKey) |
<K> long |
incr(K key) |
<K> long |
incrby(K key,
int delta) |
<K> Map<String,String> |
info() |
<K> List<byte[]> |
keys()
Convenience method.
|
<K> List<byte[]> |
keys(K pattern) |
<K> long |
lastsave() |
<K> byte[] |
lindex(K key,
long index) |
<K> long |
llen(K key)
Given a 'list' key, returns the number of items in the list.
|
<K> byte[] |
lpop(K key) |
<K> void |
lpush(K key,
byte[] value) |
<K> void |
lpush(K key,
Number value) |
<K> void |
lpush(K key,
String value) |
<K,T extends Serializable> |
lpush(K key,
T value) |
<K> List<byte[]> |
lrange(K key,
long from,
long to) |
<K> long |
lrem(K key,
byte[] value,
int count) |
<K> long |
lrem(K listKey,
Number numberValue,
int count) |
<K> long |
lrem(K listKey,
String value,
int count) |
<K,T extends Serializable> |
lrem(K listKey,
T object,
int count) |
<K> void |
lset(K key,
long index,
byte[] value) |
<K> void |
lset(K key,
long index,
Number numberValue) |
<K> void |
lset(K key,
long index,
String value) |
<K,T extends Serializable> |
lset(K key,
long index,
T object) |
<K> void |
ltrim(K key,
long keepFrom,
long keepTo) |
<K> List<byte[]> |
mget(K... keys) |
<K> boolean |
move(K key,
int dbIndex)
Moves the given key from the currently selected db to the one indicated
by
dbIndex . |
<K> void |
mset(KeyValueSet.ByteArrays<K> keyValueMap) |
<K> void |
mset(KeyValueSet.Numbers<K> keyValueMap) |
<K,T extends Serializable> |
mset(KeyValueSet.Objects<K,T> keyValueMap) |
<K> void |
mset(KeyValueSet.Strings<K> keyValueMap) |
<K> void |
mset(Map<K,byte[]> keyValueMap) |
<K> boolean |
msetnx(KeyValueSet.ByteArrays<K> keyValueMap) |
<K> boolean |
msetnx(KeyValueSet.Numbers<K> keyValueMap) |
<K,T extends Serializable> |
msetnx(KeyValueSet.Objects<K,T> keyValueMap) |
<K> boolean |
msetnx(KeyValueSet.Strings<K> keyValueMap) |
<K> boolean |
msetnx(Map<K,byte[]> keyValueMap) |
<K> JRedis |
multi()
one option is to return a subclass of JRedis (e.g.
|
<K> JRedis |
ping()
Ping redis
|
<K> void |
quit()
Disconnects the client.
|
byte[] |
randomkey() |
<K> void |
rename(K oldkey,
K newkey) |
<K> boolean |
renamenx(K oldkey,
K newkey) |
<K> byte[] |
rpop(K key) |
<K> byte[] |
rpoplpush(K srcList,
K destList) |
<K> void |
rpush(K key,
byte[] value) |
<K> void |
rpush(K key,
Number value) |
<K> void |
rpush(K key,
String value) |
<K,T extends Serializable> |
rpush(K key,
T value) |
<K> boolean |
sadd(K key,
byte[] member) |
<K> boolean |
sadd(K key,
Number value) |
<K> boolean |
sadd(K key,
String value) |
<K,T extends Serializable> |
sadd(K key,
T value) |
<K> void |
save() |
<K> long |
scard(K key) |
<K> List<byte[]> |
sdiff(K set1,
K... sets) |
<K> void |
sdiffstore(K dest,
K... sets) |
protected abstract Response |
serviceRequest(Command cmd,
byte[]... args)
This method mimics the eponymous
Connection#serviceRequest(Command, byte[]...)
which defines the blocking api semantics of Synchronous connections. |
<K> void |
set(K key,
byte[] value)
Bind the value to key.
|
<K> void |
set(K key,
Number value)
Convenient method for
String numeric values binding |
<K> void |
set(K key,
String value)
Convenient method for
String data binding |
<K,T extends Serializable> |
set(K key,
T value)
Binds the given java
Object to the key. |
<K> boolean |
setbit(K key,
int offset,
boolean value) |
<K> boolean |
setnx(K key,
byte[] value) |
<K> boolean |
setnx(K key,
Number value) |
<K> boolean |
setnx(K key,
String value) |
<K,T extends Serializable> |
setnx(K key,
T value) |
<K> List<byte[]> |
sinter(K set1,
K... sets) |
<K> void |
sinterstore(K dest,
K... sets) |
<K> boolean |
sismember(K key,
byte[] member) |
<K> boolean |
sismember(K key,
Number numberValue) |
<K> boolean |
sismember(K key,
String value) |
<K,T extends Serializable> |
sismember(K key,
T object) |
<K> void |
slaveof(String host,
int port) |
<K> void |
slaveofnone()
Convenience method.
|
<K> List<byte[]> |
smembers(K key) |
<K> boolean |
smove(K srcKey,
K destKey,
byte[] member) |
<K> boolean |
smove(K srcKey,
K destKey,
Number numberValue) |
<K> boolean |
smove(K srcKey,
K destKey,
String stringValue) |
<K,T extends Serializable> |
smove(K srcKey,
K destKey,
T object) |
<K> Sort |
sort(K key)
Usage:
|
<K> byte[] |
spop(K setkey) |
<K> byte[] |
srandmember(K setkey) |
<K> boolean |
srem(K key,
byte[] member) |
<K> boolean |
srem(K key,
Number value) |
<K> boolean |
srem(K key,
String value) |
<K,T extends Serializable> |
srem(K key,
T value) |
<K> byte[] |
substr(K key,
long from,
long to) |
<K> List<byte[]> |
sunion(K set1,
K... sets) |
<K> void |
sunionstore(K dest,
K... sets) |
<K> long |
ttl(K key) |
<K> RedisType |
type(K key) |
<K> boolean |
zadd(K key,
double score,
byte[] member) |
<K> boolean |
zadd(K key,
double score,
Number value) |
<K> boolean |
zadd(K key,
double score,
String value) |
<K,T extends Serializable> |
zadd(K key,
double score,
T value) |
<K> long |
zcard(K key) |
<K> long |
zcount(K key,
double minScore,
double maxScore) |
<K> Double |
zincrby(K key,
double score,
byte[] member) |
<K> Double |
zincrby(K key,
double score,
Number value) |
<K> Double |
zincrby(K key,
double score,
String value) |
<K,T extends Serializable> |
zincrby(K key,
double score,
T value) |
<K> List<byte[]> |
zrange(K key,
long from,
long to) |
<K> List<byte[]> |
zrangebyscore(K key,
double minScore,
double maxScore) |
<K> List<ZSetEntry> |
zrangebyscoreSubset(K key,
double minScore,
double maxScore) |
<K> List<ZSetEntry> |
zrangeSubset(K key,
long from,
long to)
Equivalent to
JRedis#zrange(String, long, long) with the Option.Options#WITHSCORES . |
<K> long |
zrank(K key,
byte[] member) |
<K> long |
zrank(K key,
Number value) |
<K> long |
zrank(K key,
String value) |
<K,T extends Serializable> |
zrank(K key,
T value) |
<K> boolean |
zrem(K key,
byte[] member) |
<K> boolean |
zrem(K key,
Number value) |
<K> boolean |
zrem(K key,
String value) |
<K,T extends Serializable> |
zrem(K key,
T value) |
<K> long |
zremrangebyrank(K key,
long minRank,
long maxRank) |
<K> long |
zremrangebyscore(K key,
double minScore,
double maxScore) |
<K> List<byte[]> |
zrevrange(K key,
long from,
long to) |
<K> List<ZSetEntry> |
zrevrangeSubset(K key,
long from,
long to)
Equivalent to
JRedis#zrevrange(String, long, long) with the Option.Options#WITHSCORES . |
<K> long |
zrevrank(K key,
byte[] member) |
<K> long |
zrevrank(K key,
Number value) |
<K> long |
zrevrank(K key,
String value) |
<K,T extends Serializable> |
zrevrank(K key,
T value) |
<K> Double |
zscore(K key,
byte[] member) |
<K> Double |
zscore(K key,
Number value) |
<K> Double |
zscore(K key,
String value) |
<K,T extends Serializable> |
zscore(K key,
T value) |
protected abstract Response serviceRequest(Command cmd, byte[]... args) throws RedisException, ClientRuntimeException, ProviderException
Connection#serviceRequest(Command, byte[]...)
which defines the blocking api semantics of Synchronous connections. The extending class
can either directly (a) implement the protocol requirements, or, (b) delegate to a
Connection
instance, or, (c) utilize a pool of Connection
s.cmd
- args
- RedisException
ClientRuntimeException
ProviderException
public <K> boolean setbit(K key, int offset, boolean value) throws ProviderException, ClientRuntimeException, RedisException
setbit
in interface JRedis
ProviderException
ClientRuntimeException
RedisException
public <K> boolean getbit(K key, int offset) throws ProviderException, ClientRuntimeException, RedisException
getbit
in interface JRedis
ProviderException
ClientRuntimeException
RedisException
public <K> void bgsave() throws RedisException
bgsave
in interface JRedis
RedisException
public <K> String bgrewriteaof() throws RedisException
bgrewriteaof
in interface JRedis
RedisException
public <K> JRedis ping() throws RedisException
JRedis
ping
in interface JRedis
RedisException
- (as of ver. 0.09) in case of unauthorized accesspublic <K> JRedis flushall() throws RedisException
JRedis
flushall
in interface JRedis
RedisException
public <K> JRedis flushdb() throws RedisException
JRedis
flushdb
in interface JRedis
RedisException
public <K> void slaveof(String host, int port) throws RedisException
slaveof
in interface JRedis
host
- ip addressRedisException
public <K> void slaveofnone() throws RedisException
JRedis
slaveofnone
in interface JRedis
RedisException
public <K> void rename(K oldkey, K newkey) throws RedisException
rename
in interface JRedis
RedisException
public <K> boolean renamenx(K oldkey, K newkey) throws RedisException
renamenx
in interface JRedis
RedisException
public <K> byte[] rpoplpush(K srcList, K destList) throws RedisException
rpoplpush
in interface JRedis
RedisException
public <K> void rpush(K key, byte[] value) throws RedisException
rpush
in interface JRedis
RedisException
public <K> void rpush(K key, String value) throws RedisException
rpush
in interface JRedis
RedisException
public <K> void rpush(K key, Number value) throws RedisException
rpush
in interface JRedis
RedisException
public <K,T extends Serializable> void rpush(K key, T value) throws RedisException
rpush
in interface JRedis
RedisException
public <K> boolean sadd(K key, byte[] member) throws RedisException
sadd
in interface JRedis
RedisException
public <K> boolean sadd(K key, String value) throws RedisException
sadd
in interface JRedis
RedisException
public <K> boolean sadd(K key, Number value) throws RedisException
sadd
in interface JRedis
RedisException
public <K,T extends Serializable> boolean sadd(K key, T value) throws RedisException
sadd
in interface JRedis
RedisException
public <K> boolean zadd(K key, double score, byte[] member) throws RedisException
zadd
in interface JRedis
RedisException
public <K> boolean zadd(K key, double score, String value) throws RedisException
zadd
in interface JRedis
RedisException
public <K> boolean zadd(K key, double score, Number value) throws RedisException
zadd
in interface JRedis
RedisException
public <K,T extends Serializable> boolean zadd(K key, double score, T value) throws RedisException
zadd
in interface JRedis
RedisException
public <K> Double zincrby(K key, double score, byte[] member) throws RedisException
zincrby
in interface JRedis
RedisException
public <K> Double zincrby(K key, double score, String value) throws RedisException
zincrby
in interface JRedis
RedisException
public <K> Double zincrby(K key, double score, Number value) throws RedisException
zincrby
in interface JRedis
RedisException
public <K,T extends Serializable> Double zincrby(K key, double score, T value) throws RedisException
zincrby
in interface JRedis
RedisException
public <K> void save() throws RedisException
save
in interface JRedis
RedisException
public <K> void set(K key, byte[] value) throws RedisException
JRedis
set
in interface JRedis
key
- any UTF-8 String
value
- any bytes. For current data size limitations, refer to
Redis documentation.RedisException
- on user error.public <K> void set(K key, String value) throws RedisException
JRedis
String
data bindingset
in interface JRedis
RedisException
JRedis#set(String, byte[])}
public <K> void set(K key, Number value) throws RedisException
JRedis
String
numeric values bindingset
in interface JRedis
RedisException
JRedis#set(String, byte[])}
public <K,T extends Serializable> void set(K key, T value) throws RedisException
JRedis
Object
to the key. Serialization format is
implementation specific. Simple implementations may apply the basic Serializable
protocol.set
in interface JRedis
RedisException
JRedis#set(String, byte[])}
public <K> byte[] getset(K key, byte[] value) throws RedisException
getset
in interface JRedis
RedisException
public <K> byte[] getset(K key, String value) throws RedisException
getset
in interface JRedis
RedisException
public <K> byte[] getset(K key, Number value) throws RedisException
getset
in interface JRedis
RedisException
public <K,T extends Serializable> byte[] getset(K key, T value) throws RedisException
getset
in interface JRedis
RedisException
public <K> boolean setnx(K key, byte[] value) throws RedisException
setnx
in interface JRedis
RedisException
public <K> boolean setnx(K key, String value) throws RedisException
setnx
in interface JRedis
RedisException
public <K> boolean setnx(K key, Number value) throws RedisException
setnx
in interface JRedis
RedisException
public <K,T extends Serializable> boolean setnx(K key, T value) throws RedisException
setnx
in interface JRedis
RedisException
public <K> long append(K key, byte[] value) throws RedisException
append
in interface JRedis
RedisException
public <K> long append(K key, String value) throws RedisException
append
in interface JRedis
RedisException
public <K> long append(K key, Number value) throws RedisException
append
in interface JRedis
RedisException
public <K,T extends Serializable> long append(K key, T value) throws RedisException
append
in interface JRedis
RedisException
public <K> boolean msetnx(Map<K,byte[]> keyValueMap) throws RedisException
msetnx
in interface JRedis
keyValueMap
- a Map
ping of String
key names to byte[] values.RedisException
public <K> boolean msetnx(KeyValueSet.ByteArrays<K> keyValueMap) throws RedisException
msetnx
in interface JRedis
RedisException
public <K> boolean msetnx(KeyValueSet.Strings<K> keyValueMap) throws RedisException
msetnx
in interface JRedis
RedisException
public <K> boolean msetnx(KeyValueSet.Numbers<K> keyValueMap) throws RedisException
msetnx
in interface JRedis
RedisException
public <K,T extends Serializable> boolean msetnx(KeyValueSet.Objects<K,T> keyValueMap) throws RedisException
msetnx
in interface JRedis
RedisException
public <K> boolean sismember(K key, byte[] member) throws RedisException
sismember
in interface JRedis
RedisException
public <K> boolean sismember(K key, String value) throws RedisException
sismember
in interface JRedis
RedisException
public <K> boolean sismember(K key, Number numberValue) throws RedisException
sismember
in interface JRedis
RedisException
public <K,T extends Serializable> boolean sismember(K key, T object) throws RedisException
sismember
in interface JRedis
RedisException
public <K> boolean smove(K srcKey, K destKey, byte[] member) throws RedisException
smove
in interface JRedis
RedisException
public <K> boolean smove(K srcKey, K destKey, String stringValue) throws RedisException
smove
in interface JRedis
RedisException
public <K> boolean smove(K srcKey, K destKey, Number numberValue) throws RedisException
smove
in interface JRedis
RedisException
public <K,T extends Serializable> boolean smove(K srcKey, K destKey, T object) throws RedisException
smove
in interface JRedis
RedisException
public <K> boolean hset(K hashKey, K hashField, byte[] value) throws RedisException
hset
in interface JRedis
RedisException
public <K> boolean hset(K key, K field, String stringValue) throws RedisException
hset
in interface JRedis
RedisException
public <K> boolean hset(K key, K field, Number numberValue) throws RedisException
hset
in interface JRedis
RedisException
public <K,T extends Serializable> boolean hset(K key, K field, T object) throws RedisException
hset
in interface JRedis
RedisException
public <K> byte[] hget(K hashKey, K hashField) throws RedisException
hget
in interface JRedis
RedisException
public <K> boolean hexists(K hashKey, K hashField) throws RedisException
hexists
in interface JRedis
RedisException
public <K> boolean hdel(K hashKey, K hashField) throws RedisException
hdel
in interface JRedis
RedisException
public <K> long hlen(K hashKey) throws RedisException
hlen
in interface JRedis
RedisException
public <K> List<byte[]> hkeys(K hashKey) throws RedisException
hkeys
in interface JRedis
RedisException
public <K> List<byte[]> hvals(K hashKey) throws RedisException
hvals
in interface JRedis
RedisException
public <K> Map<byte[],byte[]> hgetall(K hashKey) throws RedisException
hgetall
in interface JRedis
RedisException
public <K> long incr(K key) throws RedisException
incr
in interface JRedis
RedisException
public <K> long incrby(K key, int delta) throws RedisException
incrby
in interface JRedis
RedisException
public <K> long decr(K key) throws RedisException
decr
in interface JRedis
RedisException
public <K> long decrby(K key, int delta) throws RedisException
decrby
in interface JRedis
RedisException
public <K> long llen(K key) throws RedisException
JRedis
llen
in interface JRedis
RedisException
public <K> long scard(K key) throws RedisException
scard
in interface JRedis
RedisException
public <K> long zcard(K key) throws RedisException
zcard
in interface JRedis
RedisException
public <K> byte[] srandmember(K setkey) throws RedisException
srandmember
in interface JRedis
RedisException
public <K> byte[] spop(K setkey) throws RedisException
spop
in interface JRedis
RedisException
public <K> long dbsize() throws RedisException
dbsize
in interface JRedis
RedisException
public <K> long lastsave() throws RedisException
lastsave
in interface JRedis
RedisException
public <K> byte[] get(K key) throws RedisException
get
in interface JRedis
RedisException
public <K> byte[] lindex(K key, long index) throws RedisException
lindex
in interface JRedis
RedisException
public <K> byte[] lpop(K key) throws RedisException
lpop
in interface JRedis
RedisException
public <K> byte[] rpop(K key) throws RedisException
rpop
in interface JRedis
RedisException
public byte[] randomkey() throws RedisException
randomkey
in interface JRedis
RedisException
public <K> RedisType type(K key) throws RedisException
type
in interface JRedis
RedisException
public <K> ObjectInfo debug(K key) throws RedisException
debug
in interface JRedis
RedisException
ObjectInfo}
public <K> Map<String,String> info() throws RedisException
info
in interface JRedis
RedisException
public <K> void mset(Map<K,byte[]> keyValueMap) throws RedisException
mset
in interface JRedis
keyValueMap
- a Map
ping of String
key names to byte[] values.RedisException
public <K> void mset(KeyValueSet.ByteArrays<K> keyValueMap) throws RedisException
mset
in interface JRedis
RedisException
public <K> void mset(KeyValueSet.Strings<K> keyValueMap) throws RedisException
mset
in interface JRedis
RedisException
public <K> void mset(KeyValueSet.Numbers<K> keyValueMap) throws RedisException
mset
in interface JRedis
RedisException
public <K,T extends Serializable> void mset(KeyValueSet.Objects<K,T> keyValueMap) throws RedisException
mset
in interface JRedis
RedisException
public <K> List<byte[]> mget(K... keys) throws RedisException
mget
in interface JRedis
RedisException
public <K> List<byte[]> smembers(K key) throws RedisException
smembers
in interface JRedis
RedisException
public <K> List<byte[]> keys() throws RedisException
JRedis
jredis.keys("*");
keys
in interface JRedis
RedisException
JRedis#keys(String)}
public <K> List<byte[]> keys(K pattern) throws RedisException
keys
in interface JRedis
RedisException
public <K> List<byte[]> lrange(K key, long from, long to) throws RedisException
lrange
in interface JRedis
RedisException
public <K> byte[] substr(K key, long from, long to) throws RedisException
substr
in interface JRedis
RedisException
public <K> List<byte[]> zrangebyscore(K key, double minScore, double maxScore) throws RedisException
zrangebyscore
in interface JRedis
RedisException
public <K> List<ZSetEntry> zrangebyscoreSubset(K key, double minScore, double maxScore) throws RedisException
zrangebyscoreSubset
in interface JRedis
RedisException
public <K> long zremrangebyscore(K key, double minScore, double maxScore) throws RedisException
zremrangebyscore
in interface JRedis
RedisException
public <K> long zcount(K key, double minScore, double maxScore) throws RedisException
zcount
in interface JRedis
RedisException
public <K> long zremrangebyrank(K key, long minRank, long maxRank) throws RedisException
zremrangebyrank
in interface JRedis
RedisException
public <K> List<byte[]> zrange(K key, long from, long to) throws RedisException
zrange
in interface JRedis
RedisException
public <K> List<byte[]> zrevrange(K key, long from, long to) throws RedisException
zrevrange
in interface JRedis
RedisException
public <K> List<ZSetEntry> zrangeSubset(K key, long from, long to) throws RedisException
JRedis
JRedis#zrange(String, long, long)
with the Option.Options#WITHSCORES
.
Unlike the general ZRANGE command that only returns the values, this method returns both
values and associated scores for the specified range.zrangeSubset
in interface JRedis
RedisException
JRedis#zrange(String, long, long)
,
ZSetEntry
public <K> List<ZSetEntry> zrevrangeSubset(K key, long from, long to) throws RedisException
JRedis
JRedis#zrevrange(String, long, long)
with the Option.Options#WITHSCORES
.
Unlike the general ZREVRANGE command that only returns the values, this method returns both
values and associated scores for the specified range.zrevrangeSubset
in interface JRedis
RedisException
JRedis#zrevrange(String, long, long)
,
ZSetEntry
public <K> Sort sort(K key)
JRedis
Usage:
List
Sort specification elements are all options. You could simply say:
List
Sort specification elements are also can appear in any order -- the client implementation will send them to the server in the order expected by the protocol, although it is good form to specify the predicates in natural order:
List
public <K> void quit()
JRedis
public <K> List<byte[]> sinter(K set1, K... sets) throws RedisException
sinter
in interface JRedis
RedisException
public <K> List<byte[]> sunion(K set1, K... sets) throws RedisException
sunion
in interface JRedis
RedisException
public <K> List<byte[]> sdiff(K set1, K... sets) throws RedisException
sdiff
in interface JRedis
RedisException
public <K> void sinterstore(K dest, K... sets) throws RedisException
sinterstore
in interface JRedis
RedisException
public <K> void sunionstore(K dest, K... sets) throws RedisException
sunionstore
in interface JRedis
RedisException
public <K> void sdiffstore(K dest, K... sets) throws RedisException
sdiffstore
in interface JRedis
RedisException
public <K> long del(K... keys) throws RedisException
del
in interface JRedis
keys
- one or more non-null, non-zero-length, keys to be deletedRedisException
public <K> boolean exists(K key) throws RedisException
exists
in interface JRedis
RedisException
public <K> void lpush(K key, byte[] value) throws RedisException
lpush
in interface JRedis
RedisException
public <K> void lpush(K key, String value) throws RedisException
lpush
in interface JRedis
RedisException
public <K> void lpush(K key, Number value) throws RedisException
lpush
in interface JRedis
RedisException
public <K,T extends Serializable> void lpush(K key, T value) throws RedisException
lpush
in interface JRedis
RedisException
public <K> long lrem(K key, byte[] value, int count) throws RedisException
lrem
in interface JRedis
RedisException
public <K> long lrem(K listKey, String value, int count) throws RedisException
lrem
in interface JRedis
RedisException
public <K> long lrem(K listKey, Number numberValue, int count) throws RedisException
lrem
in interface JRedis
RedisException
public <K,T extends Serializable> long lrem(K listKey, T object, int count) throws RedisException
lrem
in interface JRedis
RedisException
public <K> void lset(K key, long index, byte[] value) throws RedisException
lset
in interface JRedis
RedisException
public <K> void lset(K key, long index, String value) throws RedisException
lset
in interface JRedis
RedisException
public <K> void lset(K key, long index, Number numberValue) throws RedisException
lset
in interface JRedis
RedisException
public <K,T extends Serializable> void lset(K key, long index, T object) throws RedisException
lset
in interface JRedis
RedisException
public <K> boolean move(K key, int dbIndex) throws RedisException
JRedis
dbIndex
.move
in interface JRedis
RedisException
public <K> boolean srem(K key, byte[] member) throws RedisException
srem
in interface JRedis
RedisException
public <K> boolean srem(K key, String value) throws RedisException
srem
in interface JRedis
RedisException
public <K> boolean srem(K key, Number value) throws RedisException
srem
in interface JRedis
RedisException
public <K,T extends Serializable> boolean srem(K key, T value) throws RedisException
srem
in interface JRedis
RedisException
public <K> boolean zrem(K key, byte[] member) throws RedisException
zrem
in interface JRedis
RedisException
public <K> boolean zrem(K key, String value) throws RedisException
zrem
in interface JRedis
RedisException
public <K> boolean zrem(K key, Number value) throws RedisException
zrem
in interface JRedis
RedisException
public <K,T extends Serializable> boolean zrem(K key, T value) throws RedisException
zrem
in interface JRedis
RedisException
public <K> Double zscore(K key, byte[] member) throws RedisException
zscore
in interface JRedis
RedisException
public <K> Double zscore(K key, String value) throws RedisException
zscore
in interface JRedis
RedisException
public <K> Double zscore(K key, Number value) throws RedisException
zscore
in interface JRedis
RedisException
public <K,T extends Serializable> Double zscore(K key, T value) throws RedisException
zscore
in interface JRedis
RedisException
public <K> long zrank(K key, byte[] member) throws RedisException
zrank
in interface JRedis
RedisException
public <K> long zrank(K key, String value) throws RedisException
zrank
in interface JRedis
RedisException
public <K> long zrank(K key, Number value) throws RedisException
zrank
in interface JRedis
RedisException
public <K,T extends Serializable> long zrank(K key, T value) throws RedisException
zrank
in interface JRedis
RedisException
public <K> long zrevrank(K key, byte[] member) throws RedisException
zrevrank
in interface JRedis
RedisException
public <K> long zrevrank(K key, String value) throws RedisException
zrevrank
in interface JRedis
RedisException
public <K> long zrevrank(K key, Number value) throws RedisException
zrevrank
in interface JRedis
RedisException
public <K,T extends Serializable> long zrevrank(K key, T value) throws RedisException
zrevrank
in interface JRedis
RedisException
public <K> void ltrim(K key, long keepFrom, long keepTo) throws RedisException
ltrim
in interface JRedis
RedisException
public <K> boolean expire(K key, int ttlseconds) throws RedisException
expire
in interface JRedis
RedisException
public <K> boolean expireat(K key, long epochtime) throws RedisException
expireat
in interface JRedis
RedisException
System#currentTimeMillis()}
public <K> long ttl(K key) throws RedisException
ttl
in interface JRedis
RedisException
public <K> byte[] echo(byte[] value) throws RedisException
echo
in interface JRedis
RedisException
public <K> byte[] echo(String value) throws RedisException
echo
in interface JRedis
RedisException
public <K> byte[] echo(Number value) throws RedisException
echo
in interface JRedis
RedisException
public <K,T extends Serializable> byte[] echo(T value) throws RedisException
echo
in interface JRedis
RedisException
public <K> JRedis multi() throws RedisException
multi
in interface JRedis
RedisException
public <K> JRedis discard() throws RedisException
discard
in interface JRedis
RedisException
public static <K> byte[] getKeyBytes(K key) throws IllegalArgumentException
IllegalArgumentException
Copyright © 2009–2019. All rights reserved.