public interface ListCommands extends RedisCommands
限定符和类型 | 接口和说明 |
---|---|
static class |
ListCommands.LPosArgument |
限定符和类型 | 方法和说明 |
---|---|
byte[] |
blMove(byte[] key,
byte[] destKey,
Direction from,
Direction to,
int timeout)
用于原子地从列表 key 中移除并返回第一个或最后一个元素(头或尾取决于 from 参数),然后把这个元素插入到列表 destKey 的第一个或最后一个元素(头或尾取决于 to 参数);
是 lmove 的阻塞版
详情说明 https://www.redis.com.cn/commands/lmove.html
|
String |
blMove(String key,
String destKey,
Direction from,
Direction to,
int timeout)
用于原子地从列表 key 中移除并返回第一个或最后一个元素(头或尾取决于 from 参数),然后把这个元素插入到列表 destKey 的第一个或最后一个元素(头或尾取决于 to 参数);
是 lmove 的阻塞版
详情说明 https://www.redis.com.cn/commands/lmove.html
|
List<byte[]> |
blPop(byte[][] keys,
int timeout)
移除并返回列表中一个或多个 key 的头元素,BLPOP 是列表的阻塞式(blocking)弹出原语;
当给定列表内没有任何元素可供弹出的时候,连接将被阻塞,直到等待超时或发现可弹出元素为止
详情说明 http://redisdoc.com/list/blpop.html
|
List<String> |
blPop(String[] keys,
int timeout)
移除并返回列表中一个或多个 key 的头元素,BLPOP 是列表的阻塞式(blocking)弹出原语;
当给定列表内没有任何元素可供弹出的时候,连接将被阻塞,直到等待超时或发现可弹出元素为止
详情说明 http://redisdoc.com/list/blpop.html
|
List<byte[]> |
brPop(byte[][] keys,
int timeout)
移除并返回列表中一个或多个 key 的尾元素,BRPOP 是列表的阻塞式(blocking)弹出原语;
当给定列表内没有任何元素可供弹出的时候,连接将被阻塞,直到等待超时或发现可弹出元素为止
详情说明 http://redisdoc.com/list/brpop.html
|
List<String> |
brPop(String[] keys,
int timeout)
移除并返回列表中一个或多个 key 的尾元素,BRPOP 是列表的阻塞式(blocking)弹出原语;
当给定列表内没有任何元素可供弹出的时候,连接将被阻塞,直到等待超时或发现可弹出元素为止
详情说明 http://redisdoc.com/list/brpop.html
|
byte[] |
brPoplPush(byte[] key,
byte[] destKey,
int timeout)
将列表 source 中的最后尾元素弹出,并返回;弹出的元素插入到列表 destKey ,作为 destKey 列表的的头元素;
如果 source 不存在,值 null 被返回,并且不执行其他动作;
如果 source 和 destKey 相同,则列表中的表尾元素被移动到表头,并返回该元素,可以把这种特殊情况视作列表的旋转(rotation)操作
RPOPLPUSH 是列表的阻塞式(blocking)弹出原语
详情说明 http://redisdoc.com/list/rpoplpush.html
|
String |
brPoplPush(String key,
String destKey,
int timeout)
将列表 source 中的最后尾元素弹出,并返回;弹出的元素插入到列表 destKey ,作为 destKey 列表的的头元素;
如果 source 不存在,值 null 被返回,并且不执行其他动作;
如果 source 和 destKey 相同,则列表中的表尾元素被移动到表头,并返回该元素,可以把这种特殊情况视作列表的旋转(rotation)操作
RPOPLPUSH 是列表的阻塞式(blocking)弹出原语
详情说明 http://redisdoc.com/list/rpoplpush.html
|
byte[] |
lIndex(byte[] key,
long index)
获取列表 key 中,下标为 index 的元素
详情说明 http://redisdoc.com/list/lindex.html
|
String |
lIndex(String key,
long index)
获取列表 key 中,下标为 index 的元素
详情说明 http://redisdoc.com/list/lindex.html
|
Long |
lInsert(byte[] key,
ListPosition position,
byte[] pivot,
byte[] value)
将值 value 插入到列表 key 当中,位于值 pivot 之前或之后
详情说明 http://redisdoc.com/list/linsert.html
|
Long |
lInsert(String key,
ListPosition position,
String pivot,
String value)
将值 value 插入到列表 key 当中,位于值 pivot 之前或之后
详情说明 http://redisdoc.com/list/linsert.html
|
Long |
lLen(byte[] key)
获取列表 key 的长度
详情说明 http://redisdoc.com/list/llen.html
|
Long |
lLen(String key)
获取列表 key 的长度
详情说明 http://redisdoc.com/list/llen.html
|
byte[] |
lMove(byte[] key,
byte[] destKey,
Direction from,
Direction to)
用于原子地从列表 key 中移除并返回第一个或最后一个元素(头或尾取决于 from 参数),然后把这个元素插入到列表 destKey 的第一个或最后一个元素(头或尾取决于 to 参数)
详情说明 https://www.redis.com.cn/commands/lmove.html
|
String |
lMove(String key,
String destKey,
Direction from,
Direction to)
用于原子地从列表 key 中移除并返回第一个或最后一个元素(头或尾取决于 from 参数),然后把这个元素插入到列表 destKey 的第一个或最后一个元素(头或尾取决于 to 参数)
详情说明 https://www.redis.com.cn/commands/lmove.html
|
byte[] |
lPop(byte[] key)
移除并返回列表 key 的头元素
详情说明 http://redisdoc.com/list/lpop.html
|
String |
lPop(String key)
移除并返回列表 key 的头元素
详情说明 http://redisdoc.com/list/lpop.html
|
Long |
lPos(byte[] key,
byte[] element)
返回列表 key 中匹配给定 element 成员的索引
详情说明 https://www.redis.com.cn/commands/lpos.html
|
Long |
lPos(byte[] key,
byte[] element,
ListCommands.LPosArgument lPosArgument)
返回列表 key 中匹配给定 element 成员的索引
详情说明 https://www.redis.com.cn/commands/lpos.html
|
List<Long> |
lPos(byte[] key,
byte[] element,
ListCommands.LPosArgument lPosArgument,
long count)
返回列表 key 中匹配给定 element 成员的索引
详情说明 https://www.redis.com.cn/commands/lpos.html
|
Long |
lPos(String key,
String element)
返回列表 key 中匹配给定 element 成员的索引
详情说明 https://www.redis.com.cn/commands/lpos.html
|
Long |
lPos(String key,
String element,
ListCommands.LPosArgument lPosArgument)
返回列表 key 中匹配给定 element 成员的索引
详情说明 https://www.redis.com.cn/commands/lpos.html
|
List<Long> |
lPos(String key,
String element,
ListCommands.LPosArgument lPosArgument,
long count)
返回列表 key 中匹配给定 element 成员的索引
详情说明 https://www.redis.com.cn/commands/lpos.html
|
Long |
lPush(byte[] key,
byte[]... values)
将一个或多个值 value 插入到列表 key 的表头
详情说明 http://redisdoc.com/list/lpush.html
|
Long |
lPush(String key,
String... values)
将一个或多个值 value 插入到列表 key 的表头
详情说明 http://redisdoc.com/list/lpush.html
|
Long |
lPushX(byte[] key,
byte[]... values)
将一个或多个值 value 插入到列表 key 的表头,当且仅当 key 存在并且是一个列表
详情说明 http://redisdoc.com/list/lpushx.html
|
Long |
lPushX(String key,
String... values)
将一个或多个值 value 插入到列表 key 的表头,当且仅当 key 存在并且是一个列表
详情说明 http://redisdoc.com/list/lpushx.html
|
List<byte[]> |
lRange(byte[] key,
long start,
long end)
获取列表 key 中指定区间内的元素,区间以偏移量 start 和 stop 之间的元素(包含 start 和 stop);
也可以使用负数下标,以 -1 表示列表的最后一个元素, -2 表示列表的倒数第二个元素,以此类推
详情说明 http://redisdoc.com/list/lrange.html
|
List<String> |
lRange(String key,
long start,
long end)
获取列表 key 中指定区间内的元素,区间以偏移量 start 和 stop 之间的元素(包含 start 和 stop);
也可以使用负数下标,以 -1 表示列表的最后一个元素, -2 表示列表的倒数第二个元素,以此类推
详情说明 http://redisdoc.com/list/lrange.html
|
Long |
lRem(byte[] key,
byte[] value,
long count)
移除列表中与参数 value 相等的 count 个元素元素
详情说明 http://redisdoc.com/list/lrem.html
|
Long |
lRem(String key,
String value,
long count)
移除列表中与参数 value 相等的 count 个元素元素
详情说明 http://redisdoc.com/list/lrem.html
|
com.buession.lang.Status |
lSet(byte[] key,
long index,
byte[] value)
将列表 key 下标为 index 的元素的值设置为 value
详情说明 http://redisdoc.com/list/lset.html
|
com.buession.lang.Status |
lSet(String key,
long index,
String value)
将列表 key 下标为 index 的元素的值设置为 value
详情说明 http://redisdoc.com/list/lset.html
|
com.buession.lang.Status |
lTrim(byte[] key,
long start,
long end)
移除列表指定区间外的元素;
如果 start 下标比列表的最大下标 end ( LLEN list 减去 1 )还要大,或者 start > stop ,则移除整个列表;
如果 stop 下标比 end 下标还要大,Redis将 stop 的值设置为 end
详情说明 http://redisdoc.com/list/ltrim.html
|
com.buession.lang.Status |
lTrim(String key,
long start,
long end)
移除列表指定区间外的元素;
如果 start 下标比列表的最大下标 end ( LLEN list 减去 1 )还要大,或者 start > stop ,则移除整个列表;
如果 stop 下标比 end 下标还要大,Redis将 stop 的值设置为 end
详情说明 http://redisdoc.com/list/ltrim.html
|
byte[] |
rPop(byte[] key)
移除并返回列表 key 的尾元素
详情说明 http://redisdoc.com/list/rpop.html
|
String |
rPop(String key)
移除并返回列表 key 的尾元素
详情说明 http://redisdoc.com/list/rpop.html
|
byte[] |
rPoplPush(byte[] source,
byte[] destKey)
将列表 source 中的最后尾元素弹出,并返回;弹出的元素插入到列表 destKey ,作为 destKey 列表的的头元素;
如果 source 不存在,值 null 被返回,并且不执行其他动作;
如果 source 和 destKey 相同,则列表中的表尾元素被移动到表头,并返回该元素,可以把这种特殊情况视作列表的旋转(rotation)操作
详情说明 http://redisdoc.com/list/rpoplpush.html
|
String |
rPoplPush(String source,
String destKey)
将列表 source 中的最后尾元素弹出,并返回;弹出的元素插入到列表 destKey ,作为 destKey 列表的的头元素;
如果 source 不存在,值 null 被返回,并且不执行其他动作;
如果 source 和 destKey 相同,则列表中的表尾元素被移动到表头,并返回该元素,可以把这种特殊情况视作列表的旋转(rotation)操作
详情说明 http://redisdoc.com/list/rpoplpush.html
|
Long |
rPush(byte[] key,
byte[]... values)
将一个或多个值 value 插入到列表 key 的表尾
详情说明 http://redisdoc.com/list/rpush.html
|
Long |
rPush(String key,
String... values)
将一个或多个值 value 插入到列表 key 的表尾
详情说明 http://redisdoc.com/list/rpush.html
|
Long |
rPushX(byte[] key,
byte[]... values)
将一个或多个值 value 插入到列表 key 的表尾,当且仅当 key 存在并且是一个列表
详情说明 http://redisdoc.com/list/rpushx.html
|
Long |
rPushX(String key,
String... values)
将一个或多个值 value 插入到列表 key 的表尾,当且仅当 key 存在并且是一个列表
详情说明 http://redisdoc.com/list/rpushx.html
|
String lIndex(String key, long index)
key
- Keyindex
- 下标byte[] lIndex(byte[] key, long index)
key
- Keyindex
- 下标Long lInsert(String key, ListPosition position, String pivot, String value)
key
- Keyposition
- 位置pivot
- pivotvalue
- 值Long lInsert(byte[] key, ListPosition position, byte[] pivot, byte[] value)
key
- Keyposition
- 位置pivot
- pivotvalue
- 值com.buession.lang.Status lSet(String key, long index, String value)
key
- Keyindex
- 下标value
- 值com.buession.lang.Status lSet(byte[] key, long index, byte[] value)
key
- Keyindex
- 下标value
- 值Long lLen(byte[] key)
key
- KeyList<String> lRange(String key, long start, long end)
key
- Keystart
- 开始位置end
- 结束位置List<byte[]> lRange(byte[] key, long start, long end)
key
- Keystart
- 开始位置end
- 结束位置Long lPos(String key, String element)
key
- Keyelement
- 成员Long lPos(byte[] key, byte[] element)
key
- Keyelement
- 成员Long lPos(String key, String element, ListCommands.LPosArgument lPosArgument)
key
- Keyelement
- 成员lPosArgument
- ListCommands.LPosArgument
Long lPos(byte[] key, byte[] element, ListCommands.LPosArgument lPosArgument)
key
- Keyelement
- 成员lPosArgument
- ListCommands.LPosArgument
List<Long> lPos(String key, String element, ListCommands.LPosArgument lPosArgument, long count)
key
- Keyelement
- 成员lPosArgument
- ListCommands.LPosArgument
count
- 返回数量List<Long> lPos(byte[] key, byte[] element, ListCommands.LPosArgument lPosArgument, long count)
key
- Keyelement
- 成员lPosArgument
- ListCommands.LPosArgument
count
- 返回数量Long lRem(String key, String value, long count)
key
- Keyvalue
- 值count
- 移除个数Long lRem(byte[] key, byte[] value, long count)
key
- Keyvalue
- 值count
- 移除个数com.buession.lang.Status lTrim(String key, long start, long end)
key
- Keystart
- 开始位置end
- 结束位置com.buession.lang.Status lTrim(byte[] key, long start, long end)
key
- Keystart
- 开始位置end
- 结束位置String lMove(String key, String destKey, Direction from, Direction to)
key
- KeydestKey
- 目标 Keyfrom
- 第一个或最后一个元素to
- 第一个或最后一个元素byte[] lMove(byte[] key, byte[] destKey, Direction from, Direction to)
key
- KeydestKey
- 目标 Keyfrom
- 第一个或最后一个元素to
- 第一个或最后一个元素String blMove(String key, String destKey, Direction from, Direction to, int timeout)
key
- KeydestKey
- 目标 Keyfrom
- 第一个或最后一个元素to
- 第一个或最后一个元素timeout
- 超时时间byte[] blMove(byte[] key, byte[] destKey, Direction from, Direction to, int timeout)
key
- KeydestKey
- 目标 Keyfrom
- 第一个或最后一个元素to
- 第一个或最后一个元素timeout
- 超时时间List<String> blPop(String[] keys, int timeout)
keys
- 一个或多个 keytimeout
- 超时时间List<byte[]> blPop(byte[][] keys, int timeout)
keys
- 一个或多个 keytimeout
- 超时时间List<String> brPop(String[] keys, int timeout)
keys
- 一个或多个 keytimeout
- 超时时间(单位:秒)List<byte[]> brPop(byte[][] keys, int timeout)
keys
- 一个或多个 keytimeout
- 超时时间(单位:秒)String brPoplPush(String key, String destKey, int timeout)
key
- KeydestKey
- 目标 Keytimeout
- 超时时间(单位:秒)byte[] brPoplPush(byte[] key, byte[] destKey, int timeout)
key
- KeydestKey
- 目标 Keytimeout
- 超时时间(单位:秒)byte[] lPop(byte[] key)
key
- KeyLong lPush(String key, String... values)
key
- Keyvalues
- 一个或多个值Long lPush(byte[] key, byte[]... values)
key
- Keyvalues
- 一个或多个值Long lPushX(String key, String... values)
key
- Keyvalues
- 一个或多个值Long lPushX(byte[] key, byte[]... values)
key
- Keyvalues
- 一个或多个值byte[] rPop(byte[] key)
key
- KeyString rPoplPush(String source, String destKey)
source
- KeydestKey
- 目标 Keybyte[] rPoplPush(byte[] source, byte[] destKey)
source
- KeydestKey
- 目标 KeyLong rPush(String key, String... values)
key
- Keyvalues
- 一个或多个值Long rPush(byte[] key, byte[]... values)
key
- Keyvalues
- 一个或多个值Long rPushX(String key, String... values)
key
- Keyvalues
- 一个或多个值Long rPushX(byte[] key, byte[]... values)
key
- Keyvalues
- 一个或多个值Copyright © 2022 buession.com Inc.. All rights reserved.