|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RedisStringCommands
String/Value-specific commands supported by Redis.
Nested Class Summary | |
---|---|
static class |
RedisStringCommands.BitOperation
|
Method Summary | |
---|---|
Long |
append(byte[] key,
byte[] value)
Append a value to key . |
Long |
bitCount(byte[] key)
Count the number of set bits (population counting) in value stored at key . |
Long |
bitCount(byte[] key,
long begin,
long end)
Count the number of set bits (population counting) of value stored at key between begin and
end . |
Long |
bitOp(RedisStringCommands.BitOperation op,
byte[] destination,
byte[]... keys)
Perform bitwise operations between strings. |
Long |
decr(byte[] key)
Decrement value of key by 1. |
Long |
decrBy(byte[] key,
long value)
Increment value of key by value . |
byte[] |
get(byte[] key)
Get the value of key . |
Boolean |
getBit(byte[] key,
long offset)
Get the bit value at offset of value at key . |
byte[] |
getRange(byte[] key,
long begin,
long end)
Get a substring of value of key between begin and end . |
byte[] |
getSet(byte[] key,
byte[] value)
Set value of key and return its old value. |
Long |
incr(byte[] key)
Increment value of key by 1. |
Double |
incrBy(byte[] key,
double value)
Increment value of key by value . |
Long |
incrBy(byte[] key,
long value)
Increment value of key by value . |
List<byte[]> |
mGet(byte[]... keys)
Get the values of all given keys . |
void |
mSet(Map<byte[],byte[]> tuple)
Set multiple keys to multiple values using key-value pairs provided in tuple . |
Boolean |
mSetNX(Map<byte[],byte[]> tuple)
Set multiple keys to multiple values using key-value pairs provided in tuple only if the provided key does
not exist. |
void |
pSetEx(byte[] key,
long milliseconds,
byte[] value)
Set the value and expiration in milliseconds for key . |
void |
set(byte[] key,
byte[] value)
Set value for key . |
Boolean |
setBit(byte[] key,
long offset,
boolean value)
Sets the bit at offset in value stored at key . |
void |
setEx(byte[] key,
long seconds,
byte[] value)
Set the value and expiration in seconds for key . |
Boolean |
setNX(byte[] key,
byte[] value)
Set value for key , only if key does not exist. |
void |
setRange(byte[] key,
byte[] value,
long offset)
Overwrite parts of key starting at the specified offset with given value . |
Long |
strLen(byte[] key)
Get the length of the value stored at key . |
Method Detail |
---|
byte[] get(byte[] key)
key
.
key
-
http://redis.io/commands/get
byte[] getSet(byte[] key, byte[] value)
key
and return its old value.
key
- value
-
http://redis.io/commands/getset
List<byte[]> mGet(byte[]... keys)
keys
.
keys
-
http://redis.io/commands/mget
void set(byte[] key, byte[] value)
value
for key
.
key
- value
- http://redis.io/commands/set
Boolean setNX(byte[] key, byte[] value)
value
for key
, only if key
does not exist.
key
- value
-
http://redis.io/commands/setnx
void setEx(byte[] key, long seconds, byte[] value)
value
and expiration in seconds
for key
.
key
- seconds
- value
- http://redis.io/commands/setex
void pSetEx(byte[] key, long milliseconds, byte[] value)
value
and expiration in milliseconds
for key
.
key
- milliseconds
- value
- http://redis.io/commands/psetex
void mSet(Map<byte[],byte[]> tuple)
tuple
.
tuple
- http://redis.io/commands/mset
Boolean mSetNX(Map<byte[],byte[]> tuple)
tuple
only if the provided key does
not exist.
tuple
- http://redis.io/commands/msetnx
Long incr(byte[] key)
key
by 1.
key
-
http://redis.io/commands/incr
Long incrBy(byte[] key, long value)
key
by value
.
key
-
http://redis.io/commands/incrby
Double incrBy(byte[] key, double value)
key
by value
.
key
-
http://redis.io/commands/incrbyfloat
Long decr(byte[] key)
key
by 1.
key
-
http://redis.io/commands/decr
Long decrBy(byte[] key, long value)
key
by value
.
key
- value
-
http://redis.io/commands/decrby
Long append(byte[] key, byte[] value)
value
to key
.
key
- value
-
http://redis.io/commands/append
byte[] getRange(byte[] key, long begin, long end)
key
between begin
and end
.
key
- begin
- end
-
http://redis.io/commands/getrange
void setRange(byte[] key, byte[] value, long offset)
key
starting at the specified offset
with given value
.
key
- value
- offset
- http://redis.io/commands/setrange
Boolean getBit(byte[] key, long offset)
offset
of value at key
.
key
- offset
-
http://redis.io/commands/getbit
Boolean setBit(byte[] key, long offset, boolean value)
offset
in value stored at key
.
key
- offset
- value
-
offset
.http://redis.io/commands/setbit
Long bitCount(byte[] key)
key
.
key
-
http://redis.io/commands/bitcount
Long bitCount(byte[] key, long begin, long end)
key
between begin
and
end
.
key
- begin
- end
-
http://redis.io/commands/bitcount
Long bitOp(RedisStringCommands.BitOperation op, byte[] destination, byte[]... keys)
op
- destination
- keys
-
http://redis.io/commands/bitop
Long strLen(byte[] key)
key
.
key
-
http://redis.io/commands/strlen
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |