public final class RedisMockMulti extends AbstractRedisMock
IRedisSortedSet.ZsetPair| Constructor and Description |
|---|
RedisMockMulti(AbstractRedisMock redisMock) |
| 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.
|
IRedisClient |
createClient()
Create a client.
|
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.
|
Long |
del(String... keys) |
String |
discard() |
List<Object> |
exec() |
Boolean |
exists(String key) |
Boolean |
expire(String key,
int seconds) |
Boolean |
expireat(String key,
long timestamp) |
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 |
hdel(String key,
String field,
String... fields) |
Boolean |
hexists(String key,
String field) |
String |
hget(String key,
String field) |
Map<String,String> |
hgetall(String key) |
Long |
hincrby(String key,
String field,
long increment) |
String |
hincrbyfloat(String key,
String field,
double increment) |
Set<String> |
hkeys(String key) |
Long |
hlen(String key) |
List<String> |
hmget(String key,
String field,
String... fields) |
String |
hmset(String key,
String field,
String value,
String... fieldsvalues) |
ScanResult<Map<String,String>> |
hscan(String key,
long cursor,
String... options) |
Boolean |
hset(String key,
String field,
String value) |
Boolean |
hsetnx(String key,
String field,
String value) |
Long |
hstrlen(String key,
String field) |
List<String> |
hvals(String key) |
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 |
lindex(String key,
long index) |
Long |
linsert(String key,
String before_after,
String pivot,
String value) |
Long |
llen(String key) |
String |
lpop(String key) |
Long |
lpush(String key,
String element,
String... elements) |
Long |
lpushx(String key,
String element) |
List<String> |
lrange(String key,
long start,
long end) |
Long |
lrem(String key,
long count,
String element) |
String |
lset(String key,
long index,
String element) |
String |
ltrim(String key,
long start,
long end) |
String[] |
mget(String... keys)
Returns the values of all specified keys.
|
boolean |
modified(Integer hashCode,
String command,
List<Object> args) |
String |
mset(String... keyvalues)
Sets the given keys to their respective values.
|
Boolean |
msetnx(String... keyvalues)
Sets the given keys to their respective values.
|
IRedisClient |
multi() |
Boolean |
persist(String key) |
Boolean |
pexpire(String key,
long milliseconds) |
Boolean |
pexpireat(String key,
long timestamp) |
String |
psetex(String key,
long milliseconds,
String value)
Set and expire a key in milliseconds.
|
String |
rpop(String key) |
String |
rpoplpush(String source,
String dest) |
Long |
rpush(String key,
String element,
String... elements) |
Long |
rpushx(String key,
String element) |
Long |
sadd(String key,
String member,
String... members) |
Long |
scard(String key) |
Set<String> |
sdiff(String key,
String... keys) |
Long |
sdiffstore(String destination,
String key,
String... keys) |
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.
|
Set<String> |
sinter(String key,
String... keys) |
Long |
sinterstore(String destination,
String key,
String... keys) |
Boolean |
sismember(String key,
String member) |
Set<String> |
smembers(String key) |
Boolean |
smove(String source,
String dest,
String member) |
String |
spop(String key) |
String |
srandmember(String key) |
List<String> |
srandmember(String key,
long count) |
Long |
srem(String key,
String member,
String... members) |
ScanResult<Set<String>> |
sscan(String key,
long cursor,
String... options) |
Long |
strlen(String key)
Return the length of the string at key.
|
Set<String> |
sunion(String key,
String... keys) |
Long |
sunionstore(String destination,
String key,
String... keys) |
String |
type(String key) |
String |
unwatch() |
String |
watch(String key) |
close, dump, keys, migrate, move, object, pttl, randomkey, rename, renamenx, restore, scan, sort, ttl, zadd, zadd, zcard, zcount, zincrby, zinterstore, zlexcount, zrange, zrangebylex, zrangebyscore, zrank, zrem, zremrangebylex, zremrangebyrank, zremrangebyscore, zrevrange, zrevrangebylex, zrevrangebyscore, zrevrank, zscan, zscore, zunionstorepublic RedisMockMulti(AbstractRedisMock redisMock)
public List<Object> exec()
exec in interface IRedisTransactionexec in class AbstractRedisClientpublic IRedisClient multi()
multi in interface IRedisTransactionmulti in class AbstractRedisClientpublic String discard() throws NotImplementedException
discard in interface IRedisTransactiondiscard in class AbstractRedisClientNotImplementedExceptionpublic String unwatch() throws NotImplementedException
unwatch in interface IRedisTransactionunwatch in class AbstractRedisClientNotImplementedExceptionpublic String watch(String key) throws NotImplementedException
watch in interface IRedisTransactionwatch in class AbstractRedisClientNotImplementedExceptionpublic IRedisClient createClient()
IRedisClientpublic boolean modified(Integer hashCode, String command, List<Object> args)
modified in class AbstractRedisMockpublic Long del(String... keys)
del in interface IRedisKeysdel in class AbstractRedisClientpublic Boolean exists(String key)
exists in interface IRedisKeysexists in class AbstractRedisClientpublic Boolean expire(String key, int seconds)
expire in interface IRedisKeysexpire in class AbstractRedisClientpublic Boolean expireat(String key, long timestamp)
expireat in interface IRedisKeysexpireat in class AbstractRedisClientpublic Boolean persist(String key)
persist in interface IRedisKeyspersist in class AbstractRedisClientpublic Boolean pexpire(String key, long milliseconds)
pexpire in interface IRedisKeyspexpire in class AbstractRedisClientpublic Boolean pexpireat(String key, long timestamp)
pexpireat in interface IRedisKeyspexpireat in class AbstractRedisClientpublic String type(String key)
type in interface IRedisKeystype in class AbstractRedisClientpublic Long append(String key, String value)
IRedisStringappend in interface IRedisStringappend in class AbstractRedisClientkey - The keyvalue - The valuepublic Long bitcount(String key, long... options)
IRedisStringbitcount in interface IRedisStringbitcount in class AbstractRedisClientkey - The keyoptions - start, endpublic Long bitop(String operation, String destkey, String... keys)
IRedisStringbitop in interface IRedisStringbitop in class AbstractRedisClientoperation - 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.public Long bitpos(String key, long bit, long... options)
IRedisStringbitpos in interface IRedisStringbitpos in class AbstractRedisClientkey - The keybit - 0|1options - start, endpublic Long decr(String key)
IRedisStringdecr in interface IRedisStringdecr in class AbstractRedisClientkey - The keypublic Long decrby(String key, long decrement)
IRedisStringdecrby in interface IRedisStringdecrby in class AbstractRedisClientkey - The keydecrement - The number to decrement bypublic String get(String key)
IRedisStringget in interface IRedisStringget in class AbstractRedisClientkey - The keypublic Boolean getbit(String key, long offset)
IRedisStringgetbit in interface IRedisStringgetbit in class AbstractRedisClientkey - The keyoffset - The offset within the stringpublic String getrange(String key, long start, long end)
IRedisStringgetrange in interface IRedisStringgetrange in class AbstractRedisClientkey - The keystart - The start index of the rangeend - The end index of the rangepublic String getset(String key, String value)
IRedisStringgetset in interface IRedisStringgetset in class AbstractRedisClientkey - The keyvalue - The new valuepublic Long incr(String key)
IRedisStringincr in interface IRedisStringincr in class AbstractRedisClientkey - The keypublic Long incrby(String key, long increment)
IRedisStringincrby in interface IRedisStringincrby in class AbstractRedisClientkey - The keyincrement - The increment to increase the key bypublic String incrbyfloat(String key, double increment)
IRedisStringincrbyfloat in interface IRedisStringincrbyfloat in class AbstractRedisClientkey - The keyincrement - The increment to increase the key bypublic String[] mget(String... keys)
IRedisStringmget in interface IRedisStringmget in class AbstractRedisClientkeys - The keys to getpublic String mset(String... keyvalues)
IRedisStringmset in interface IRedisStringmset in class AbstractRedisClientkeyvalues - The key-value pairs to set.public Boolean msetnx(String... keyvalues)
IRedisStringmsetnx in interface IRedisStringmsetnx in class AbstractRedisClientkeyvalues - The key-value pairs to set.public String psetex(String key, long milliseconds, String value)
IRedisStringpsetex in interface IRedisStringpsetex in class AbstractRedisClientkey - The keymilliseconds - The expiry time in millisecondsvalue - The valuepublic String set(String key, String value, String... options)
IRedisStringset in interface IRedisStringset in class AbstractRedisClientkey - The keyvalue - The valueoptions - nx|xx, ex|px timeout.public Long setbit(String key, long offset, boolean value)
IRedisStringsetbit in interface IRedisStringsetbit in class AbstractRedisClientkey - The keyoffset - The offsetvalue - Whether to set or clear the bit (set = true, clear = false)public String setex(String key, int seconds, String value)
IRedisStringsetex in interface IRedisStringsetex in class AbstractRedisClientkey - The keyseconds - The expiry time in secondsvalue - The valuepublic Long setnx(String key, String value)
IRedisStringsetnx in interface IRedisStringsetnx in class AbstractRedisClientkey - The keyvalue - The valuepublic Long setrange(String key, long offset, String value)
IRedisStringsetrange in interface IRedisStringsetrange in class AbstractRedisClientkey - The keyoffset - Where to start. If greater than the length of the string,
the string is padded out to the offset.value - The valuepublic Long strlen(String key)
IRedisStringstrlen in interface IRedisStringstrlen in class AbstractRedisClientkey - The keypublic String lindex(String key, long index)
lindex in interface IRedisListlindex in class AbstractRedisClientpublic Long linsert(String key, String before_after, String pivot, String value)
linsert in interface IRedisListlinsert in class AbstractRedisClientpublic Long llen(String key)
llen in interface IRedisListllen in class AbstractRedisClientpublic String lpop(String key)
lpop in interface IRedisListlpop in class AbstractRedisClientpublic Long lpush(String key, String element, String... elements)
lpush in interface IRedisListlpush in class AbstractRedisClientpublic Long lpushx(String key, String element)
lpushx in interface IRedisListlpushx in class AbstractRedisClientpublic List<String> lrange(String key, long start, long end)
lrange in interface IRedisListlrange in class AbstractRedisClientpublic Long lrem(String key, long count, String element)
lrem in interface IRedisListlrem in class AbstractRedisClientpublic String lset(String key, long index, String element)
lset in interface IRedisListlset in class AbstractRedisClientpublic String ltrim(String key, long start, long end)
ltrim in interface IRedisListltrim in class AbstractRedisClientpublic String rpop(String key)
rpop in interface IRedisListrpop in class AbstractRedisClientpublic String rpoplpush(String source, String dest)
rpoplpush in interface IRedisListrpoplpush in class AbstractRedisClientpublic Long rpush(String key, String element, String... elements)
rpush in interface IRedisListrpush in class AbstractRedisClientpublic Long rpushx(String key, String element)
rpushx in interface IRedisListrpushx in class AbstractRedisClientpublic Long sadd(String key, String member, String... members)
sadd in interface IRedisSetsadd in class AbstractRedisClientpublic Long scard(String key)
scard in interface IRedisSetscard in class AbstractRedisClientpublic Set<String> sdiff(String key, String... keys)
sdiff in interface IRedisSetsdiff in class AbstractRedisClientpublic Long sdiffstore(String destination, String key, String... keys)
sdiffstore in interface IRedisSetsdiffstore in class AbstractRedisClientpublic Set<String> sinter(String key, String... keys)
sinter in interface IRedisSetsinter in class AbstractRedisClientpublic Long sinterstore(String destination, String key, String... keys)
sinterstore in interface IRedisSetsinterstore in class AbstractRedisClientpublic Boolean sismember(String key, String member)
sismember in interface IRedisSetsismember in class AbstractRedisClientpublic Set<String> smembers(String key)
smembers in interface IRedisSetsmembers in class AbstractRedisClientpublic Boolean smove(String source, String dest, String member)
smove in interface IRedisSetsmove in class AbstractRedisClientpublic String spop(String key)
spop in interface IRedisSetspop in class AbstractRedisClientpublic String srandmember(String key)
srandmember in interface IRedisSetsrandmember in class AbstractRedisClientpublic List<String> srandmember(String key, long count)
srandmember in interface IRedisSetsrandmember in class AbstractRedisClientpublic Long srem(String key, String member, String... members)
srem in interface IRedisSetsrem in class AbstractRedisClientpublic Set<String> sunion(String key, String... keys)
sunion in interface IRedisSetsunion in class AbstractRedisClientpublic Long sunionstore(String destination, String key, String... keys)
sunionstore in interface IRedisSetsunionstore in class AbstractRedisClientpublic ScanResult<Set<String>> sscan(String key, long cursor, String... options)
sscan in interface IRedisSetsscan in class AbstractRedisClientpublic Long hdel(String key, String field, String... fields)
hdel in interface IRedisHashhdel in class AbstractRedisClientpublic Boolean hexists(String key, String field)
hexists in interface IRedisHashhexists in class AbstractRedisClientpublic String hget(String key, String field)
hget in interface IRedisHashhget in class AbstractRedisClientpublic Map<String,String> hgetall(String key)
hgetall in interface IRedisHashhgetall in class AbstractRedisClientpublic Long hincrby(String key, String field, long increment) throws WrongTypeException, NotIntegerHashException
hincrby in interface IRedisHashhincrby in class AbstractRedisClientWrongTypeExceptionNotIntegerHashExceptionpublic String hincrbyfloat(String key, String field, double increment) throws WrongTypeException, NotFloatHashException
hincrbyfloat in interface IRedisHashhincrbyfloat in class AbstractRedisClientWrongTypeExceptionNotFloatHashExceptionpublic Set<String> hkeys(String key) throws WrongTypeException
hkeys in interface IRedisHashhkeys in class AbstractRedisClientWrongTypeExceptionpublic Long hlen(String key) throws WrongTypeException
hlen in interface IRedisHashhlen in class AbstractRedisClientWrongTypeExceptionpublic List<String> hmget(String key, String field, String... fields) throws WrongTypeException
hmget in interface IRedisHashhmget in class AbstractRedisClientWrongTypeExceptionpublic String hmset(String key, String field, String value, String... fieldsvalues) throws WrongTypeException, ArgException
hmset in interface IRedisHashhmset in class AbstractRedisClientWrongTypeExceptionArgExceptionpublic Boolean hset(String key, String field, String value) throws WrongTypeException
hset in interface IRedisHashhset in class AbstractRedisClientWrongTypeExceptionpublic Boolean hsetnx(String key, String field, String value) throws WrongTypeException
hsetnx in interface IRedisHashhsetnx in class AbstractRedisClientWrongTypeExceptionpublic Long hstrlen(String key, String field) throws WrongTypeException
hstrlen in interface IRedisHashhstrlen in class AbstractRedisClientWrongTypeExceptionpublic List<String> hvals(String key) throws WrongTypeException
hvals in interface IRedisHashhvals in class AbstractRedisClientWrongTypeExceptionpublic ScanResult<Map<String,String>> hscan(String key, long cursor, String... options)
hscan in interface IRedisHashhscan in class AbstractRedisClientCopyright © 2015. All rights reserved.