public class RedisTemplateX<K,V> extends Object implements IRedisCommands<K,V>
| Constructor and Description |
|---|
RedisTemplateX(org.springframework.data.redis.core.RedisTemplate<K,V> redisTemplate) |
| Modifier and Type | Method and Description |
|---|---|
Integer |
append(K key,
String value)
Append a
value to key. |
List<Long> |
bitField(K key,
org.springframework.data.redis.connection.BitFieldSubCommands subCommands)
Get / Manipulate specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset stored
at a given
key. |
V |
blPop(K key,
long timeoutSeconds)
Removes and returns first element from lists stored at
key . |
org.springframework.data.redis.core.BoundGeoOperations<K,V> |
boundGeoOps(K key) |
<HK,HV> org.springframework.data.redis.core.BoundHashOperations<K,HK,HV> |
boundHashOps(K key) |
org.springframework.data.redis.core.BoundListOperations<K,V> |
boundListOps(K key) |
org.springframework.data.redis.core.BoundSetOperations<K,V> |
boundSetOps(K key) |
org.springframework.data.redis.core.BoundValueOperations<K,V> |
boundValueOps(K key) |
org.springframework.data.redis.core.BoundZSetOperations<K,V> |
boundZSetOps(K key) |
V |
brPop(K key,
long timeoutSeconds)
Removes and returns last element from lists stored at
key. |
V |
brPoplPush(K srcKey,
K dstKey,
long timeoutSeconds)
Remove the last element from list at
srcKey, append it to dstKey and return its value.Blocks connection until element available or timeoutSeconds reached. |
Long |
countExistingKeys(Collection<K> keys)
Count the number of
keys that exist. |
Long |
decr(K key)
Decrement an integer value stored as string value under
key by one. |
Long |
decrBy(K key,
long delta)
Decrement an integer value stored as string value under
key by delta. |
Long |
del(Collection<K> keys)
Delete given
keys. |
Boolean |
del(K key)
Delete given
key. |
void |
discard()
Discard all commands issued after
multi(). |
List<Object> |
exec()
Executes all queued commands in a transaction started with
multi(). |
List<Object> |
exec(org.springframework.data.redis.serializer.RedisSerializer<?> valueSerializer)
Execute a transaction, using the provided
RedisSerializer to deserialize any results that are byte[]s or
Collections of byte[]s. |
<T> T |
execute(SessionCallbackX session)
Executes a Redis session.
|
List<Object> |
executePipelined(SessionCallbackX session)
Executes the given Redis session on a pipelined connection.
|
List<Object> |
executePipelined(SessionCallbackX session,
org.springframework.data.redis.serializer.RedisSerializer<?> resultSerializer)
Executes the given Redis session on a pipelined connection, returning the results using a dedicated serializer.
|
Boolean |
exists(K key)
Determine if given
key exists. |
Boolean |
expire(K key,
long timeoutSeconds)
Set time(Seconds) to live for given
key.. |
Boolean |
expireAt(K key,
Date date)
Set the expiration for given
key as a date timestamp. |
Long |
geoAdd(K key,
Iterable<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<V>> geoLocations)
Add
RedisGeoCommands.GeoLocations to key |
Long |
geoAdd(K key,
Map<V,org.springframework.data.geo.Point> memberCoordinateMap)
Add
Map of member / Point pairs to key. |
Long |
geoAdd(K key,
org.springframework.data.geo.Point point,
V member)
Add
Point with given member name to key. |
Long |
geoAdd(K key,
org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<V> location)
Add
RedisGeoCommands.GeoLocation to key. |
org.springframework.data.geo.Distance |
geoDist(K key,
V member1,
V member2)
Get the
Distance between member1 and member2. |
org.springframework.data.geo.Distance |
geoDist(K key,
V member1,
V member2,
org.springframework.data.geo.Metric metric)
Get the
Distance between member1 and member2 in the given Metric. |
List<String> |
geoHash(K key,
V... members)
Get Geohash representation of the position for one or more members.
|
List<org.springframework.data.geo.Point> |
geoPos(K key,
V... members)
Get the
Point representation of positions for one or more members. |
org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<V>> |
geoRadius(K key,
org.springframework.data.geo.Circle within)
Get the members within the boundaries of a given
Circle. |
org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<V>> |
geoRadius(K key,
org.springframework.data.geo.Circle within,
org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
Get the members within the boundaries of a given
Circle applying RedisGeoCommands.GeoRadiusCommandArgs. |
org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<V>> |
geoRadiusByMember(K key,
V member,
org.springframework.data.geo.Distance distance)
Get the members within the circle defined by the members coordinates and given
radius applying
Metric. |
org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<V>> |
geoRadiusByMember(K key,
V member,
org.springframework.data.geo.Distance distance,
org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
Get the members within the circle defined by the members coordinates and given
radius applying
Metric and RedisGeoCommands.GeoRadiusCommandArgs. |
org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<V>> |
geoRadiusByMember(K key,
V member,
double radius)
Get the members within the circle defined by the members coordinates and given
radius.
|
Long |
geoRemove(K key,
V... members)
Remove the members.
|
V |
get(K key)
Get the value of
key. |
Boolean |
getBit(K key,
long offset)
Get the bit value at
offset of value at key. |
String |
getRange(K key,
long start,
long end)
Get a substring of value of
key between begin and end. |
org.springframework.data.redis.core.RedisTemplate<K,V> |
getRedisTemplate() |
V |
getSet(K key,
V value)
Set
value of key and return its old value. |
Long |
hDel(K key,
Object... hashKeys)
Delete given hash
hashKeys. |
Boolean |
hExists(K key,
Object hashKey)
Determine if given hash
hashKey exists. |
<T> T |
hGet(K key,
Object hashKey)
Get value for given
hashKey from hash at key. |
<HK,HV> Map<HK,HV> |
hGetAll(K key)
Get entire hash stored at
key. |
<HK> Set<HK> |
hKeys(K key)
Get key set (fields) of hash at
key. |
Long |
hLen(K key)
Get size of hash at
key. |
<T> List<T> |
hMget(K key,
Collection<Object> hashKeys)
Get values for given
hashKeys from hash at key. |
void |
hmset(K key,
Map<Object,Object> m)
Set multiple hash fields to multiple values using data provided in
m. |
void |
hSet(K key,
Object hashKey,
Object value)
Set the
value of a hash hashKey. |
<HV> List<HV> |
hVals(K key)
Get entry set (values) of hash at
key. |
Long |
incr(K key)
Increment an integer value stored as string value under
key by one. |
Long |
incrBy(K key,
long delta)
Increment an integer value stored as string value under
key by delta. |
V |
lIndex(K key,
long index)
Get element at
index form list at key. |
Long |
lLen(K key)
Get the size of list stored at
key. |
V |
lPop(K key)
Removes and returns first element in list stored at
key. |
Long |
lPush(K key,
Collection<V> values)
Prepend
values to key. |
Long |
lPush(K key,
V... values)
Prepend
values to key. |
Long |
lPush(K key,
V value)
Prepend
value to key. |
Long |
lPushx(K key,
V value)
Prepend
values to key only if the list exists. |
List<V> |
lRange(K key,
long start,
long end)
Get elements between
begin and end from list at key. |
Long |
lRem(K key,
long count,
V value)
Removes the first
count occurrences of value from the list stored at key. |
void |
lSet(K key,
long index,
V value)
Set the
value list element at index. |
void |
ltrim(K key,
long start,
long end)
Trim list at
key to elements between start and end. |
List<V> |
mGet(Collection<K> keys)
Get multiple
keys. |
Boolean |
move(K key,
int dbIndex)
Move given
key to database with index. |
void |
mSet(Map<K,V> map)
Set multiple keys to multiple values using key-value pairs provided in
tuple. |
void |
mSet(Object... keysValues)
Set multiple keys to multiple values using key-value pairs.
|
void |
multi()
Mark the start of a transaction block.
|
org.springframework.data.redis.core.ClusterOperations<K,V> |
opsForCluster() |
org.springframework.data.redis.core.GeoOperations<K,V> |
opsForGeo() |
<HK,HV> org.springframework.data.redis.core.HashOperations<K,HK,HV> |
opsForHash() |
org.springframework.data.redis.core.HyperLogLogOperations<K,V> |
opsForHyperLogLog() |
org.springframework.data.redis.core.ListOperations<K,V> |
opsForList() |
org.springframework.data.redis.core.SetOperations<K,V> |
opsForSet() |
org.springframework.data.redis.core.ValueOperations<K,V> |
opsForValue() |
org.springframework.data.redis.core.ZSetOperations<K,V> |
opsForZSet() |
Boolean |
persist(K key)
Remove the expiration from given
key. |
Boolean |
pExpire(K key,
long millTimeoutSeconds)
Set time(Seconds) to live for given
key.. |
Long |
pfAdd(K key,
V... values)
Adds the given values to the key.
|
Long |
pfCount(K... keys)
Gets the current number of elements within the key.
|
Long |
pfMerge(K destination,
K... sourceKeys)
Merges all values of given sourceKeys into destination key.
|
void |
rename(K oldKey,
K newKey)
Rename key
oldKey to newKey. |
V |
rPop(K key)
Removes and returns last element in list stored at
key. |
V |
rPoplPush(K srcKey,
K dstKey)
Remove the last element from list at
sourceKey, append it to destinationKey and return its value. |
Long |
rPush(K key,
Collection<V> values)
Append
values to key. |
Long |
rPush(K key,
V... values)
Append
values to key. |
Long |
rPush(K key,
V value)
Append
value to key. |
Long |
rPushx(K key,
V value)
Append
values to key only if the list exists. |
Long |
sAdd(K key,
V... values)
Add given
values to set at key. |
Long |
sCard(K key)
Get size of set at
key. |
Set<V> |
sDiff(K key,
Collection<K> otherKeys)
Diff all sets for given
key and otherKeys. |
Set<V> |
sDiff(K key,
K otherKey)
Diff all sets for given
key and otherKey. |
Long |
sDiffStore(K key,
Collection<K> otherKeys,
K destKey)
Diff all sets for given
key and otherKeys and store result in destKey. |
Long |
sDiffStore(K key,
K otherKey,
K destKey)
Diff all sets for given
key and otherKey and store result in destKey. |
void |
set(K key,
V value)
Set
value for key. |
Boolean |
setBit(K key,
long offset,
boolean value)
Sets the bit at
offset in value stored at key. |
void |
setEnableTransactionSupport(Boolean enableTransactionSupport) |
void |
setEx(K key,
long timeoutSeconds,
V value)
Set the
value and expiration timeout for key. |
void |
setEx(K key,
long timeout,
V value,
TimeUnit unit)
Set the
value and expiration timeout for key. |
Boolean |
setNx(K key,
V value)
Set
key to hold the string value if key is absent. |
Boolean |
setNx(K key,
V value,
long timeoutSeconds)
Set
key to hold the string value and expiration timeout if key is absent. |
Boolean |
setNx(K key,
V value,
long timeout,
TimeUnit unit)
Set
key to hold the string value and expiration timeout if key is absent. |
void |
setRange(K key,
V value,
long offset)
Overwrite parts of
key starting at the specified offset with given value. |
Boolean |
setXx(K key,
V value)
Set
key to hold the string value if key is present. |
Boolean |
setXx(K key,
V value,
long timeoutSeconds)
Set
key to hold the string value and expiration timeout if key is present. |
Boolean |
setXx(K key,
V value,
long timeout,
TimeUnit unit)
Set
key to hold the string value and expiration timeout if key is present. |
Set<V> |
sInter(K key,
Collection<K> otherKeys)
Returns the members intersecting all given sets at
key and otherKeys. |
Set<V> |
sInter(K key,
K otherKey)
Returns the members intersecting all given sets at
key and otherKey. |
Long |
sInterStore(K key,
Collection<K> otherKeys,
K destKey)
Intersect all given sets at
key and otherKeys and store result in destKey. |
Long |
sInterstore(K key,
K otherKey,
K destKey)
Intersect all given sets at
key and otherKey and store result in destKey. |
Boolean |
sIsMember(K key,
Object member)
Check if set at
key contains value. |
Set<V> |
sMembers(K key)
Get all elements of set at
key. |
List<V> |
sort(org.springframework.data.redis.core.query.SortQuery<K> query)
Sort the elements for
query. |
<T,S> List<T> |
sort(org.springframework.data.redis.core.query.SortQuery<K> query,
org.springframework.data.redis.core.BulkMapper<T,S> bulkMapper,
org.springframework.data.redis.serializer.RedisSerializer<S> resultSerializer)
Sort the elements for
query applying BulkMapper and RedisSerializer. |
<T> List<T> |
sort(org.springframework.data.redis.core.query.SortQuery<K> query,
org.springframework.data.redis.core.BulkMapper<T,V> bulkMapper)
Sort the elements for
query applying BulkMapper. |
Long |
sort(org.springframework.data.redis.core.query.SortQuery<K> query,
K storeKey)
Sort the elements for
query and store result in storeKey. |
<T> List<T> |
sort(org.springframework.data.redis.core.query.SortQuery<K> query,
org.springframework.data.redis.serializer.RedisSerializer<T> resultSerializer)
Sort the elements for
query applying RedisSerializer. |
V |
sPop(K key)
Remove and return a random member from set at
key. |
V |
sRandMember(K key)
Get random element from set at
key. |
List<V> |
sRandMember(K key,
long count)
Get
count random elements from set at key. |
Long |
sRem(K key,
Object... members)
Remove given
values from set at key and return the number of removed elements. |
Long |
strLen(K key)
Get the length of the value stored at
key. |
Set<V> |
sUnion(K key,
Collection<K> otherKeys)
Union all sets at given
keys and otherKeys. |
Set<V> |
sUnion(K key,
K otherKey)
Union all sets at given
keys and otherKey. |
Long |
sUnionStore(K key,
Collection<K> otherKeys,
K destKey)
Union all sets at given
key and otherKeys and store result in destKey. |
Long |
sUnionStore(K key,
K otherKey,
K destKey)
Union all sets at given
key and otherKey and store result in destKey. |
Long |
ttl(K key)
Get the time to live for
key in seconds. |
org.springframework.data.redis.connection.DataType |
type(K key)
Determine the type stored at
key. |
Long |
unlink(Collection<K> keys)
Unlink the
keys from the keyspace. |
Boolean |
unlink(K key)
Unlink the
key from the keyspace. |
void |
unwatch()
Flushes all the previously
watch(Object) keys. |
void |
watch(Collection<K> keys)
Watch given
keys for modifications during transaction started with multi(). |
void |
watch(K key)
Watch given
key for modifications during transaction started with multi(). |
Long |
zAdd(K key,
Map<V,Double> scoreMembers)
Add
scoreMembers to a sorted set at key, or update its score if it already exists. |
Boolean |
zAdd(K key,
V member,
double score)
Add
member to a sorted set at key, or update its score if it already exists. |
Long |
zCard(K key)
Returns the number of elements of the sorted set stored with given
key. |
Long |
zCount(K key,
double min,
double max)
Count number of elements within sorted set with scores between
min and max. |
Double |
zIncrby(K key,
V member,
double score)
Increment the score of element with
member in sorted set by score. |
Long |
zInterStore(K key,
Collection<K> otherKeys,
K destKey)
Intersect sorted sets at
key and otherKeys and store result in destination destKey. |
Long |
zInterStore(K key,
Collection<K> otherKeys,
K destKey,
org.springframework.data.redis.connection.RedisZSetCommands.Aggregate aggregate,
org.springframework.data.redis.connection.RedisZSetCommands.Weights weights)
Intersect sorted sets at
key and otherKeys and store result in destination destKey. |
Long |
zInterStore(K key,
K otherKey,
K destKey)
Intersect sorted sets at
key and otherKey and store result in destination destKey. |
Set<V> |
zRange(K key,
long start,
long end)
Get elements between
start and end from sorted set. |
Set<V> |
zRangeByLex(K key,
org.springframework.data.redis.connection.RedisZSetCommands.Range range)
Get all elements with lexicographical ordering from ZSET at
key with a value between
RedisZSetCommands.Range#getMin() and RedisZSetCommands.Range#getMax(). |
Set<V> |
zRangeByLex(K key,
org.springframework.data.redis.connection.RedisZSetCommands.Range range,
org.springframework.data.redis.connection.RedisZSetCommands.Limit limit)
Get all elements n elements, where n =
RedisZSetCommands.Limit#getCount(), starting at
RedisZSetCommands.Limit#getOffset() with lexicographical ordering from ZSET at key with a value between
RedisZSetCommands.Range#getMin() and RedisZSetCommands.Range#getMax(). |
Set<V> |
zRangeByScore(K key,
double min,
double max)
Get elements where score is between
min and max from sorted set. |
Set<V> |
zRangeByScore(K key,
double min,
double max,
long offset,
long count)
Get elements in range from
min to max where score is between min and max from
sorted set. |
Long |
zRank(K key,
Object member)
Determine the index of element with
value in a sorted set. |
Long |
zRem(K key,
Object... members)
Remove
values from sorted set. |
Long |
zRemRangeByRank(K key,
long start,
long end)
Remove elements in range between
start and end from sorted set with key. |
Long |
zRemRangeByScore(K key,
double min,
double max)
Remove elements with scores between
min and max from sorted set with key. |
Set<V> |
zRevRange(K key,
double min,
double max)
Get elements where score is between
min and max from sorted set ordered from high to low. |
Set<V> |
zRevRange(K key,
long start,
long end)
Get elements in range from
start to end from sorted set ordered from high to low. |
Set<V> |
zRevRangeByScore(K key,
double min,
double max,
long offset,
long count)
Get elements in range from
start to end where score is between min and max from
sorted set ordered high -> low. |
Long |
zRevRank(K key,
Object member)
Determine the index of element with
member in a sorted set when scored high to low. |
org.springframework.data.redis.core.Cursor<org.springframework.data.redis.core.ZSetOperations.TypedTuple<V>> |
zScan(K key,
org.springframework.data.redis.core.ScanOptions options)
Iterate over elements in zset at
key. |
Double |
zScore(K key,
Object member)
Get the score of element with
member from sorted set with key key. |
Long |
zUnionStore(K key,
Collection<K> otherKeys,
K destKey)
Union sorted sets at
key and otherKeys and store result in destination destKey. |
Long |
zUnionStore(K key,
Collection<K> otherKeys,
K destKey,
org.springframework.data.redis.connection.RedisZSetCommands.Aggregate aggregate,
org.springframework.data.redis.connection.RedisZSetCommands.Weights weights)
Union sorted sets at
key and otherKeys and store result in destination destKey. |
Long |
zUnionStore(K key,
K otherKey,
K destKey)
Union sorted sets at
key and otherKeys and store result in destination destKey. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitzInterStore, zUnionStorepublic <HK,HV> org.springframework.data.redis.core.BoundHashOperations<K,HK,HV> boundHashOps(K key)
public <HK,HV> org.springframework.data.redis.core.HashOperations<K,HK,HV> opsForHash()
public org.springframework.data.redis.core.HyperLogLogOperations<K,V> opsForHyperLogLog()
public org.springframework.data.redis.core.BoundListOperations<K,V> boundListOps(K key)
public org.springframework.data.redis.core.BoundValueOperations<K,V> boundValueOps(K key)
public org.springframework.data.redis.core.BoundZSetOperations<K,V> boundZSetOps(K key)
public void setEnableTransactionSupport(Boolean enableTransactionSupport)
public void set(K key, V value)
value for key.set in interface IValueCommands<K,V>key - must not be null.value - must not be null.public void setEx(K key, long timeoutSeconds, V value)
value and expiration timeout for key.setEx in interface IValueCommands<K,V>key - must not be null.value - must not be null.timeoutSeconds - the key expiration timeout.public void setEx(K key, long timeout, V value, TimeUnit unit)
value and expiration timeout for key.setEx in interface IValueCommands<K,V>key - must not be null.timeout - the key expiration timeout.value - must not be null.unit - must not be null.public Boolean setNx(K key, V value)
key to hold the string value if key is absent.setNx in interface IValueCommands<K,V>key - must not be null.value - must not be null.public Boolean setNx(K key, V value, long timeoutSeconds)
key to hold the string value and expiration timeout if key is absent.setNx in interface IValueCommands<K,V>key - must not be null.value - must not be null.timeoutSeconds - the key expiration timeout.public Boolean setNx(K key, V value, long timeout, TimeUnit unit)
key to hold the string value and expiration timeout if key is absent.setNx in interface IValueCommands<K,V>key - must not be null.value - must not be null.timeout - the key expiration timeout.unit - must not be null.public Boolean setXx(K key, V value)
key to hold the string value if key is present.
redis: SET key value XXsetXx in interface IValueCommands<K,V>key - must not be null.value - must not be null.IllegalArgumentException - if either key or value is not present.public Boolean setXx(K key, V value, long timeoutSeconds)
key to hold the string value and expiration timeout if key is present.
redis: SET key value EX seconds XXsetXx in interface IValueCommands<K,V>key - must not be null.value - must not be null.timeoutSeconds - the key expiration timeout.IllegalArgumentException - if either key, value or timeout is not present.public Boolean setXx(K key, V value, long timeout, TimeUnit unit)
key to hold the string value and expiration timeout if key is present.
redis: SET key value [EX seconds|PX milliseconds] XXsetXx in interface IValueCommands<K,V>key - must not be null.value - must not be null.timeout - the key expiration timeout.unit - must not be null.IllegalArgumentException - if either key, value or timeout is not present.public V get(K key)
key.get in interface IValueCommands<K,V>key - must not be null.public Boolean del(K key)
key.del in interface IValueCommands<K,V>key - must not be null.public Long del(Collection<K> keys)
keys.del in interface IValueCommands<K,V>keys - must not be null.public void mSet(Object... keysValues)
mSet in interface IValueCommands<K,V>keysValues - must not be null.public void mSet(Map<K,V> map)
tuple.mSet in interface IValueCommands<K,V>map - must not be null.public List<V> mGet(Collection<K> keys)
keys. Values are returned in the order of the requested keys.mGet in interface IValueCommands<K,V>keys - must not be null.public Long decr(K key)
key by one.decr in interface IValueCommands<K,V>key - must not be null.public Long decrBy(K key, long delta)
key by delta.decrBy in interface IValueCommands<K,V>key - must not be null.delta - public Long incr(K key)
key by one.incr in interface IValueCommands<K,V>key - must not be null.public Long incrBy(K key, long delta)
key by delta.incrBy in interface IValueCommands<K,V>key - must not be null.delta - public Boolean exists(K key)
key exists.exists in interface IValueCommands<K,V>key - must not be null.public void rename(K oldKey, K newKey)
oldKey to newKey.rename in interface IValueCommands<K,V>oldKey - must not be null.newKey - must not be null.public Boolean expire(K key, long timeoutSeconds)
key..expire in interface IValueCommands<K,V>key - must not be null.timeoutSeconds - public Boolean expireAt(K key, Date date)
key as a date timestamp.expireAt in interface IValueCommands<K,V>key - must not be null.date - must not be null.public Boolean pExpire(K key, long millTimeoutSeconds)
key..pExpire in interface IValueCommands<K,V>key - must not be null.millTimeoutSeconds - public V getSet(K key, V value)
value of key and return its old value.getSet in interface IValueCommands<K,V>key - must not be null.public Boolean persist(K key)
key.persist in interface IValueCommands<K,V>key - must not be null.public org.springframework.data.redis.connection.DataType type(K key)
key.type in interface IValueCommands<K,V>key - must not be null.public Long ttl(K key)
key in seconds.ttl in interface IValueCommands<K,V>key - must not be null.public Long countExistingKeys(Collection<K> keys)
keys that exist.countExistingKeys in interface IValueCommands<K,V>keys - must not be null.public Integer append(K key, String value)
value to key.append in interface IValueCommands<K,V>key - must not be null.value - public String getRange(K key, long start, long end)
key between begin and end.getRange in interface IValueCommands<K,V>key - must not be null.start - end - public void setRange(K key, V value, long offset)
key starting at the specified offset with given value.setRange in interface IValueCommands<K,V>key - must not be null.value - offset - public Long strLen(K key)
key.strLen in interface IValueCommands<K,V>key - must not be null.public Boolean setBit(K key, long offset, boolean value)
offset in value stored at key.setBit in interface IValueCommands<K,V>key - must not be null.offset - value - public Boolean getBit(K key, long offset)
offset of value at key.getBit in interface IValueCommands<K,V>key - must not be null.offset - public List<Long> bitField(K key, org.springframework.data.redis.connection.BitFieldSubCommands subCommands)
key.bitField in interface IValueCommands<K,V>key - must not be null.subCommands - must not be null.public void hSet(K key, Object hashKey, Object value)
value of a hash hashKey.hSet in interface IHashCommands<K,V>key - must not be null.hashKey - must not be null.value - public void hmset(K key, Map<Object,Object> m)
m.hmset in interface IHashCommands<K,V>key - must not be null.m - must not be null.public <T> T hGet(K key, Object hashKey)
hashKey from hash at key.hGet in interface IHashCommands<K,V>key - must not be null.hashKey - must not be null.public <T> List<T> hMget(K key, Collection<Object> hashKeys)
hashKeys from hash at key.hMget in interface IHashCommands<K,V>key - must not be null.hashKeys - must not be null.public Long hDel(K key, Object... hashKeys)
hashKeys.hDel in interface IHashCommands<K,V>key - must not be null.hashKeys - must not be null.public Boolean hExists(K key, Object hashKey)
hashKey exists.hExists in interface IHashCommands<K,V>key - must not be null.hashKey - must not be null.public <HK,HV> Map<HK,HV> hGetAll(K key)
key.hGetAll in interface IHashCommands<K,V>key - must not be null.public <HV> List<HV> hVals(K key)
key.hVals in interface IHashCommands<K,V>key - must not be null.public <HK> Set<HK> hKeys(K key)
key.hKeys in interface IHashCommands<K,V>key - must not be null.public Long hLen(K key)
key.hLen in interface IHashCommands<K,V>key - must not be null.public V lIndex(K key, long index)
index form list at key.lIndex in interface IListCommands<K,V>key - must not be null.index - public Long lLen(K key)
key.lLen in interface IListCommands<K,V>key - must not be null.public V lPop(K key)
key.lPop in interface IListCommands<K,V>key - must not be null.public Long lPush(K key, V value)
value to key.lPush in interface IListCommands<K,V>key - must not be null.value - public Long lPush(K key, V... values)
values to key.lPush in interface IListCommands<K,V>key - must not be null.values - public Long lPush(K key, Collection<V> values)
values to key.lPush in interface IListCommands<K,V>key - must not be null.values - must not be null.public Long lPushx(K key, V value)
values to key only if the list exists.lPushx in interface IListCommands<K,V>key - must not be null.value - public void lSet(K key, long index, V value)
value list element at index.lSet in interface IListCommands<K,V>key - must not be null.index - value - public Long lRem(K key, long count, V value)
count occurrences of value from the list stored at key.lRem in interface IListCommands<K,V>key - must not be null.count - value - public List<V> lRange(K key, long start, long end)
begin and end from list at key.lRange in interface IListCommands<K,V>key - must not be null.start - end - public void ltrim(K key, long start, long end)
key to elements between start and end.ltrim in interface IListCommands<K,V>key - must not be null.start - end - public V rPop(K key)
key.rPop in interface IListCommands<K,V>key - must not be null.public V rPoplPush(K srcKey, K dstKey)
sourceKey, append it to destinationKey and return its value.rPoplPush in interface IListCommands<K,V>srcKey - must not be null.dstKey - must not be null.public V brPoplPush(K srcKey, K dstKey, long timeoutSeconds)
srcKey, append it to dstKey and return its value.timeoutSeconds reached.brPoplPush in interface IListCommands<K,V>srcKey - must not be null.dstKey - must not be null.timeoutSeconds - public Long rPush(K key, V value)
value to key.rPush in interface IListCommands<K,V>key - must not be null.value - public Long rPush(K key, V... values)
values to key.rPush in interface IListCommands<K,V>key - must not be null.values - public Long rPush(K key, Collection<V> values)
values to key.rPush in interface IListCommands<K,V>key - must not be null.values - public Long rPushx(K key, V value)
values to key only if the list exists.rPushx in interface IListCommands<K,V>key - must not be null.value - public V blPop(K key, long timeoutSeconds)
key . timeoutSeconds reached.blPop in interface IListCommands<K,V>key - must not be null.timeoutSeconds - public V brPop(K key, long timeoutSeconds)
key. timeoutSeconds reached.brPop in interface IListCommands<K,V>key - must not be null.timeoutSeconds - public Long sAdd(K key, V... values)
values to set at key.sAdd in interface ISetCommands<K,V>key - must not be null.values - public Long sCard(K key)
key.sCard in interface ISetCommands<K,V>key - must not be null.public V sPop(K key)
key.sPop in interface ISetCommands<K,V>key - must not be null.public Set<V> sMembers(K key)
key.sMembers in interface ISetCommands<K,V>key - must not be null.public Boolean sIsMember(K key, Object member)
key contains value.sIsMember in interface ISetCommands<K,V>key - must not be null.member - public Set<V> sInter(K key, K otherKey)
key and otherKey.sInter in interface ISetCommands<K,V>key - must not be null.otherKey - must not be null.public Set<V> sInter(K key, Collection<K> otherKeys)
key and otherKeys.sInter in interface ISetCommands<K,V>key - must not be null.otherKeys - must not be null.public Long sInterstore(K key, K otherKey, K destKey)
key and otherKey and store result in destKey.sInterstore in interface ISetCommands<K,V>key - must not be null.otherKey - must not be null.destKey - must not be null.public Long sInterStore(K key, Collection<K> otherKeys, K destKey)
key and otherKeys and store result in destKey.sInterStore in interface ISetCommands<K,V>key - must not be null.otherKeys - must not be null.destKey - must not be null.public V sRandMember(K key)
key.sRandMember in interface ISetCommands<K,V>key - must not be null.public List<V> sRandMember(K key, long count)
count random elements from set at key.sRandMember in interface ISetCommands<K,V>key - must not be null.count - nr of members to return.List if key does not exist or null when used in pipeline / transaction.IllegalArgumentException - if count is negative.public Long sRem(K key, Object... members)
values from set at key and return the number of removed elements.sRem in interface ISetCommands<K,V>key - must not be null.members - public Set<V> sUnion(K key, K otherKey)
keys and otherKey.sUnion in interface ISetCommands<K,V>key - must not be null.otherKey - must not be null.public Set<V> sUnion(K key, Collection<K> otherKeys)
keys and otherKeys.sUnion in interface ISetCommands<K,V>key - must not be null.otherKeys - must not be null.public Long sUnionStore(K key, K otherKey, K destKey)
key and otherKey and store result in destKey.sUnionStore in interface ISetCommands<K,V>key - must not be null.otherKey - must not be null.destKey - must not be null.public Long sUnionStore(K key, Collection<K> otherKeys, K destKey)
key and otherKeys and store result in destKey.sUnionStore in interface ISetCommands<K,V>key - must not be null.otherKeys - must not be null.destKey - must not be null.public Set<V> sDiff(K key, K otherKey)
key and otherKey.sDiff in interface ISetCommands<K,V>key - must not be null.otherKey - must not be null.public Set<V> sDiff(K key, Collection<K> otherKeys)
key and otherKeys.sDiff in interface ISetCommands<K,V>key - must not be null.otherKeys - must not be null.public Long sDiffStore(K key, K otherKey, K destKey)
key and otherKey and store result in destKey.sDiffStore in interface ISetCommands<K,V>key - must not be null.otherKey - must not be null.destKey - must not be null.public Long sDiffStore(K key, Collection<K> otherKeys, K destKey)
key and otherKeys and store result in destKey.sDiffStore in interface ISetCommands<K,V>key - must not be null.otherKeys - must not be null.destKey - must not be null.public Boolean zAdd(K key, V member, double score)
member to a sorted set at key, or update its score if it already exists.zAdd in interface IZSetCommands<K,V>key - must not be null.member - the member.score - the score.public Long zAdd(K key, Map<V,Double> scoreMembers)
scoreMembers to a sorted set at key, or update its score if it already exists.zAdd in interface IZSetCommands<K,V>key - must not be null.scoreMembers - must not be null.public Long zCard(K key)
key.zCard in interface IZSetCommands<K,V>key - public Long zCount(K key, double min, double max)
min and max.zCount in interface IZSetCommands<K,V>key - must not be null.min - max - public Double zIncrby(K key, V member, double score)
member in sorted set by score.zIncrby in interface IZSetCommands<K,V>key - must not be null.member - the member.score - public Set<V> zRange(K key, long start, long end)
start and end from sorted set.zRange in interface IZSetCommands<K,V>key - must not be null.start - end - public Set<V> zRevRange(K key, long start, long end)
start to end from sorted set ordered from high to low.zRevRange in interface IZSetCommands<K,V>key - must not be null.start - end - public Set<V> zRangeByScore(K key, double min, double max)
min and max from sorted set.zRangeByScore in interface IZSetCommands<K,V>key - must not be null.min - max - public Long zRank(K key, Object member)
value in a sorted set.zRank in interface IZSetCommands<K,V>key - must not be null.member - the member.public Long zRevRank(K key, Object member)
member in a sorted set when scored high to low.zRevRank in interface IZSetCommands<K,V>key - must not be null.member - the member.public Long zRem(K key, Object... members)
values from sorted set. Return number of removed elements.zRem in interface IZSetCommands<K,V>key - must not be null.members - must not be null.public Double zScore(K key, Object member)
member from sorted set with key key.zScore in interface IZSetCommands<K,V>key - must not be null.member - the member.public Set<V> zRangeByScore(K key, double min, double max, long offset, long count)
min to max where score is between min and max from
sorted set.zRangeByScore in interface IZSetCommands<K,V>key - must not be null.min - max - offset - count - public Set<V> zRevRange(K key, double min, double max)
min and max from sorted set ordered from high to low.zRevRange in interface IZSetCommands<K,V>key - must not be null.min - max - public Set<V> zRevRangeByScore(K key, double min, double max, long offset, long count)
start to end where score is between min and max from
sorted set ordered high -> low.zRevRangeByScore in interface IZSetCommands<K,V>key - must not be null.min - max - offset - count - public Long zRemRangeByRank(K key, long start, long end)
start and end from sorted set with key.zRemRangeByRank in interface IZSetCommands<K,V>key - must not be null.start - end - public Long zRemRangeByScore(K key, double min, double max)
min and max from sorted set with key.zRemRangeByScore in interface IZSetCommands<K,V>key - must not be null.min - max - public Long zUnionStore(K key, K otherKey, K destKey)
key and otherKeys and store result in destination destKey.zUnionStore in interface IZSetCommands<K,V>key - must not be null.otherKey - must not be null.destKey - must not be null.public Long zUnionStore(K key, Collection<K> otherKeys, K destKey)
key and otherKeys and store result in destination destKey.zUnionStore in interface IZSetCommands<K,V>key - must not be null.otherKeys - must not be null.destKey - must not be null.public Long zUnionStore(K key, Collection<K> otherKeys, K destKey, org.springframework.data.redis.connection.RedisZSetCommands.Aggregate aggregate, org.springframework.data.redis.connection.RedisZSetCommands.Weights weights)
key and otherKeys and store result in destination destKey.zUnionStore in interface IZSetCommands<K,V>key - must not be null.otherKeys - must not be null.destKey - must not be null.aggregate - must not be null.weights - must not be null.public Long zInterStore(K key, K otherKey, K destKey)
key and otherKey and store result in destination destKey.zInterStore in interface IZSetCommands<K,V>key - must not be null.otherKey - must not be null.destKey - must not be null.public Long zInterStore(K key, Collection<K> otherKeys, K destKey)
key and otherKeys and store result in destination destKey.zInterStore in interface IZSetCommands<K,V>key - must not be null.otherKeys - must not be null.destKey - must not be null.public Long zInterStore(K key, Collection<K> otherKeys, K destKey, org.springframework.data.redis.connection.RedisZSetCommands.Aggregate aggregate, org.springframework.data.redis.connection.RedisZSetCommands.Weights weights)
key and otherKeys and store result in destination destKey.zInterStore in interface IZSetCommands<K,V>key - must not be null.otherKeys - must not be null.destKey - must not be null.aggregate - must not be null.weights - must not be null.public org.springframework.data.redis.core.Cursor<org.springframework.data.redis.core.ZSetOperations.TypedTuple<V>> zScan(K key, org.springframework.data.redis.core.ScanOptions options)
key. Closeable.close() when done to avoid resource leak.zScan in interface IZSetCommands<K,V>key - options - public Set<V> zRangeByLex(K key, org.springframework.data.redis.connection.RedisZSetCommands.Range range)
key with a value between
RedisZSetCommands.Range#getMin() and RedisZSetCommands.Range#getMax().zRangeByLex in interface IZSetCommands<K,V>key - must not be null.range - must not be null.public Set<V> zRangeByLex(K key, org.springframework.data.redis.connection.RedisZSetCommands.Range range, org.springframework.data.redis.connection.RedisZSetCommands.Limit limit)
RedisZSetCommands.Limit#getCount(), starting at
RedisZSetCommands.Limit#getOffset() with lexicographical ordering from ZSET at key with a value between
RedisZSetCommands.Range#getMin() and RedisZSetCommands.Range#getMax().zRangeByLex in interface IZSetCommands<K,V>key - must not be nullrange - must not be null.limit - can be null.public Long geoAdd(K key, org.springframework.data.geo.Point point, V member)
Point with given member name to key.geoAdd in interface IGeoCommands<K,V>key - must not be null.point - must not be null.member - must not be null.public Long geoAdd(K key, org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<V> location)
RedisGeoCommands.GeoLocation to key.geoAdd in interface IGeoCommands<K,V>key - must not be null.location - must not be null.public Long geoAdd(K key, Map<V,org.springframework.data.geo.Point> memberCoordinateMap)
Map of member / Point pairs to key.geoAdd in interface IGeoCommands<K,V>key - must not be null.memberCoordinateMap - must not be null.public Long geoAdd(K key, Iterable<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<V>> geoLocations)
RedisGeoCommands.GeoLocations to keygeoAdd in interface IGeoCommands<K,V>key - must not be null.geoLocations - must not be null.public org.springframework.data.geo.Distance geoDist(K key, V member1, V member2)
Distance between member1 and member2.geoDist in interface IGeoCommands<K,V>key - must not be null.member1 - must not be null.member2 - must not be null.public org.springframework.data.geo.Distance geoDist(K key, V member1, V member2, org.springframework.data.geo.Metric metric)
Distance between member1 and member2 in the given Metric.geoDist in interface IGeoCommands<K,V>key - must not be null.member1 - must not be null.member2 - must not be null.metric - must not be null.public List<String> geoHash(K key, V... members)
geoHash in interface IGeoCommands<K,V>key - must not be null.members - must not be null.public List<org.springframework.data.geo.Point> geoPos(K key, V... members)
Point representation of positions for one or more members.geoPos in interface IGeoCommands<K,V>key - must not be null.members - must not be null.public org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<V>> geoRadius(K key, org.springframework.data.geo.Circle within)
Circle.geoRadius in interface IGeoCommands<K,V>key - must not be null.within - must not be null.public org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<V>> geoRadius(K key, org.springframework.data.geo.Circle within, org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
Circle applying RedisGeoCommands.GeoRadiusCommandArgs.geoRadius in interface IGeoCommands<K,V>key - must not be null.within - must not be null.args - must not be null.public org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<V>> geoRadiusByMember(K key, V member, double radius)
geoRadiusByMember in interface IGeoCommands<K,V>key - must not be null.member - must not be null.radius - public org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<V>> geoRadiusByMember(K key, V member, org.springframework.data.geo.Distance distance)
Metric.geoRadiusByMember in interface IGeoCommands<K,V>key - must not be null.member - must not be null.distance - must not be null.public org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<V>> geoRadiusByMember(K key, V member, org.springframework.data.geo.Distance distance, org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
Metric and RedisGeoCommands.GeoRadiusCommandArgs.geoRadiusByMember in interface IGeoCommands<K,V>key - must not be null.member - must not be null.distance - must not be null.args - must not be null.public Long geoRemove(K key, V... members)
geoRemove in interface IGeoCommands<K,V>key - must not be null.members - must not be null.public Long pfAdd(K key, V... values)
pfAdd in interface IHyperLogLogCommands<K,V>key - must not be null.values - must not be null.public Long pfCount(K... keys)
pfCount in interface IHyperLogLogCommands<K,V>keys - must not be null or empty.public Long pfMerge(K destination, K... sourceKeys)
pfMerge in interface IHyperLogLogCommands<K,V>destination - key of HyperLogLog to move source keys into.sourceKeys - must not be null or empty.public Boolean unlink(K key)
key from the keyspace. Unlike with IValueCommands.del(Object) the actual memory reclaiming here
happens asynchronously.unlink in interface IRedisCommands<K,V>key - must not be null.public Long unlink(Collection<K> keys)
keys from the keyspace. Unlike with IValueCommands.del(Collection) the actual memory reclaiming
here happens asynchronously.unlink in interface IRedisCommands<K,V>keys - must not be null.public Boolean move(K key, int dbIndex)
key to database with index.move in interface IRedisCommands<K,V>key - must not be null.dbIndex - public List<V> sort(org.springframework.data.redis.core.query.SortQuery<K> query)
query.sort in interface IRedisCommands<K,V>query - must not be null.public <T> List<T> sort(org.springframework.data.redis.core.query.SortQuery<K> query, org.springframework.data.redis.serializer.RedisSerializer<T> resultSerializer)
query applying RedisSerializer.sort in interface IRedisCommands<K,V>query - must not be null.resultSerializer - public <T> List<T> sort(org.springframework.data.redis.core.query.SortQuery<K> query, org.springframework.data.redis.core.BulkMapper<T,V> bulkMapper)
query applying BulkMapper.sort in interface IRedisCommands<K,V>query - must not be null.bulkMapper - public <T,S> List<T> sort(org.springframework.data.redis.core.query.SortQuery<K> query, org.springframework.data.redis.core.BulkMapper<T,S> bulkMapper, org.springframework.data.redis.serializer.RedisSerializer<S> resultSerializer)
query applying BulkMapper and RedisSerializer.sort in interface IRedisCommands<K,V>query - must not be null.bulkMapper - resultSerializer - public Long sort(org.springframework.data.redis.core.query.SortQuery<K> query, K storeKey)
query and store result in storeKey.sort in interface IRedisCommands<K,V>query - must not be null.storeKey - must not be null.public <T> T execute(SessionCallbackX session)
multi() and watch(Collection) operations.execute in interface IRedisCommands<K,V>T - return typesession - session callback. Must not be null.public List<Object> executePipelined(SessionCallbackX session)
executePipelined in interface IRedisCommands<K,V>session - Session callbackpublic List<Object> executePipelined(SessionCallbackX session, org.springframework.data.redis.serializer.RedisSerializer<?> resultSerializer)
executePipelined in interface IRedisCommands<K,V>session - Session callbackresultSerializer - public void watch(K key)
key for modifications during transaction started with multi().watch in interface IRedisTransactionsCommands<K,V>key - must not be null.public void watch(Collection<K> keys)
keys for modifications during transaction started with multi().watch in interface IRedisTransactionsCommands<K,V>keys - must not be null.public void unwatch()
watch(Object) keys.unwatch in interface IRedisTransactionsCommands<K,V>public void multi()
exec() or rolled back using discard()
multi in interface IRedisTransactionsCommands<K,V>public void discard()
multi().discard in interface IRedisTransactionsCommands<K,V>public List<Object> exec()
multi(). watch(Object) the operation will fail if any of watched keys has been modified.exec in interface IRedisTransactionsCommands<K,V>public List<Object> exec(org.springframework.data.redis.serializer.RedisSerializer<?> valueSerializer)
RedisSerializer to deserialize any results that are byte[]s or
Collections of byte[]s. If a result is a Map, the provided RedisSerializer will be used for both the keys
and values. Other result types (Long, Boolean, etc) are left as-is in the converted results. Tuple results are
automatically converted to TypedTuples.exec in interface IRedisTransactionsCommands<K,V>valueSerializer - The RedisSerializer to use for deserializing the results of transaction execCopyright © 2021. All rights reserved.