public interface IRedisString
| Modifier and Type | Method and Description |
|---|---|
Long |
append(String key,
String value)
Append value onto key.
|
Long |
bitcount(String key,
long... options)
Count the number of set bits in a string.
|
Long |
bitop(String operation,
String destkey,
String... keys)
Perform a bitwise operation between multiple keys and store the result in the destination key.
|
Long |
bitpos(String key,
long bit,
long... options)
Return the position of the first bit set to 0 or 1 in a string.
|
Long |
decr(String key)
Decrement the number stored at key by one.
|
Long |
decrby(String key,
long decrement)
Decrement the number stored at key by the given decrement.
|
String |
get(String key)
Get the value of a key.
|
Boolean |
getbit(String key,
long offset)
Returns the bit value at offset in the string value stored at key.
|
String |
getrange(String key,
long start,
long end)
Returns the substring of the string value stored at key, determined by the inclusive offsets
start and end.
|
String |
getset(String key,
String value)
Atomically set a key and return its previous value.
|
Long |
incr(String key)
Increment the number stored at key by one.
|
Long |
incrby(String key,
long increment)
Increment the number stored at key by the given increment.
|
String |
incrbyfloat(String key,
double increment)
Increment the number stored at key by the given increment.
|
String[] |
mget(String... keys)
Returns the values of all specified keys.
|
String |
mset(String... keysvalues)
Sets the given keys to their respective values.
|
Boolean |
msetnx(String... keysvalues)
Sets the given keys to their respective values.
|
String |
psetex(String key,
long milliseconds,
String value)
Set and expire a key in milliseconds.
|
String |
set(String key,
String value,
String... options)
Set key to hold the string value.
|
Long |
setbit(String key,
long offset,
boolean value)
Sets or clears the bit at offset in the string value stored at key.
|
String |
setex(String key,
int seconds,
String value)
Set and expire a key in seconds.
|
Long |
setnx(String key,
String value)
Set a key only if it does not already exist.
|
Long |
setrange(String key,
long offset,
String value)
Ovewrite part of the string starting at offset with value.
|
Long |
strlen(String key)
Return the length of the string at key.
|
Long append(String key, String value) throws WrongTypeException, NotImplementedException
key - The keyvalue - The valueWrongTypeException - If key is not a stringNotImplementedException - If the command is unimplemented.Long bitcount(String key, long... options) throws WrongTypeException, NotImplementedException
key - The keyoptions - start, endWrongTypeException - If key is not a stringNotImplementedException - If the command is unimplemented.Long bitop(String operation, String destkey, String... keys) throws WrongTypeException, NotImplementedException
operation - The operation to perform. Valid values are "and", "or", "xor", and "not".destkey - The destination key to store the operation result in.keys - The keys to operate against.WrongTypeException - If key is not a stringNotImplementedException - If the command is unimplemented.Long bitpos(String key, long bit, long... options) throws WrongTypeException, BitArgException, NotImplementedException
key - The keybit - 0|1options - start, endWrongTypeException - If key is not a stringBitArgException - If bit is not equal to 0 or 1NotImplementedException - If the command is unimplemented.Long decr(String key) throws WrongTypeException, NotIntegerException, NotImplementedException
key - The keyWrongTypeException - If key is not a stringNotIntegerException - If key does not hold an integer valueNotImplementedException - If the command is unimplemented.Long decrby(String key, long decrement) throws WrongTypeException, NotIntegerException, NotImplementedException
key - The keydecrement - The number to decrement byWrongTypeException - If key is not a stringNotIntegerException - If key does not hold an integer valueNotImplementedException - If the command is unimplemented.String get(String key) throws WrongTypeException, NotImplementedException
key - The keyWrongTypeException - If key is not a stringNotImplementedException - If the command is unimplemented.Boolean getbit(String key, long offset) throws WrongTypeException, NotImplementedException
key - The keyoffset - The offset within the stringWrongTypeException - If key is not a stringNotImplementedException - If the command is unimplemented.String getrange(String key, long start, long end) throws WrongTypeException, NotImplementedException
key - The keystart - The start index of the rangeend - The end index of the rangeWrongTypeException - If key is not a stringNotImplementedException - If the command is unimplemented.String getset(String key, String value) throws WrongTypeException, NotImplementedException
key - The keyvalue - The new valueWrongTypeException - If key is not a stringNotImplementedException - If the command is unimplemented.Long incr(String key) throws WrongTypeException, NotIntegerException, NotImplementedException
key - The keyWrongTypeException - If key is not a stringNotIntegerException - If key does not hold an integer valueNotImplementedException - If the command is unimplemented.Long incrby(String key, long increment) throws WrongTypeException, NotIntegerException, NotImplementedException
key - The keyincrement - The increment to increase the key byWrongTypeException - If key is not a stringNotIntegerException - If key does not hold an integer valueNotImplementedException - If the command is unimplemented.String incrbyfloat(String key, double increment) throws WrongTypeException, NotFloatException, NotImplementedException
key - The keyincrement - The increment to increase the key byWrongTypeException - If key is not a stringNotFloatException - If key does not hold a floating point valueNotImplementedException - If the command is unimplemented.String[] mget(String... keys) throws NotImplementedException
keys - The keys to getNotImplementedException - If the command is unimplemented.String mset(String... keysvalues) throws ArgException, NotImplementedException
keysvalues - The key-value pairs to set.ArgException - If the given arguments are not validNotImplementedException - If the command is unimplemented.Boolean msetnx(String... keysvalues) throws ArgException, NotImplementedException
keysvalues - The key-value pairs to set.ArgException - If the given arguments are not validNotImplementedException - If the command is unimplemented.String psetex(String key, long milliseconds, String value) throws NotImplementedException
key - The keymilliseconds - The expiry time in millisecondsvalue - The valueNotImplementedException - If the command is unimplemented.String set(String key, String value, String... options) throws NotImplementedException, SyntaxErrorException
key - The keyvalue - The valueoptions - nx|xx, ex|px timeout.NotImplementedException - If the command is unimplemented.SyntaxErrorException - If the given options were not valid.Long setbit(String key, long offset, boolean value) throws WrongTypeException, NotImplementedException
key - The keyoffset - The offsetvalue - Whether to set or clear the bit (set = true, clear = false)WrongTypeException - If key is not a stringNotImplementedException - If the command is unimplemented.String setex(String key, int seconds, String value) throws NotImplementedException
key - The keyseconds - The expiry time in secondsvalue - The valueNotImplementedException - If the command is unimplemented.Long setnx(String key, String value) throws NotImplementedException
key - The keyvalue - The valueNotImplementedException - If the command is unimplemented.Long setrange(String key, long offset, String value) throws WrongTypeException, NotImplementedException
key - The keyoffset - Where to start. If greater than the length of the string,
the string is padded out to the offset.value - The valueWrongTypeException - If key is not a stringNotImplementedException - If the command is unimplemented.Long strlen(String key) throws WrongTypeException, NotImplementedException
key - The keyWrongTypeException - If key is not a stringNotImplementedException - If the command is unimplemented.Copyright © 2015. All rights reserved.