public final class JedisClusterListOperations extends AbstractListOperations<JedisClusterClient>
ListCommands.LPosArgument
JedisRedisOperations.AbstractJedisCommand<C extends JedisRedisClient,R>, JedisRedisOperations.JedisClusterCommand<R>, JedisRedisOperations.JedisCommand<R>, JedisRedisOperations.JedisSentinelCommand<R>
client
logger
构造器和说明 |
---|
JedisClusterListOperations(JedisClusterClient client) |
限定符和类型 | 方法和说明 |
---|---|
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[] key,
byte[] destKey)
将列表 source 中的最后尾元素弹出,并返回;弹出的元素插入到列表 destKey ,作为 destKey 列表的的头元素;
如果 source 不存在,值 null 被返回,并且不执行其他动作;
如果 source 和 destKey 相同,则列表中的表尾元素被移动到表头,并返回该元素,可以把这种特殊情况视作列表的旋转(rotation)操作
详情说明 http://redisdoc.com/list/rpoplpush.html
|
String |
rPoplPush(String key,
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
|
public JedisClusterListOperations(JedisClusterClient client)
public String lIndex(String key, long index)
ListCommands
key
- Keyindex
- 下标public byte[] lIndex(byte[] key, long index)
ListCommands
key
- Keyindex
- 下标public Long lInsert(String key, ListPosition position, String pivot, String value)
ListCommands
key
- Keyposition
- 位置pivot
- pivotvalue
- 值public Long lInsert(byte[] key, ListPosition position, byte[] pivot, byte[] value)
ListCommands
key
- Keyposition
- 位置pivot
- pivotvalue
- 值public com.buession.lang.Status lSet(String key, long index, String value)
ListCommands
key
- Keyindex
- 下标value
- 值public com.buession.lang.Status lSet(byte[] key, long index, byte[] value)
ListCommands
key
- Keyindex
- 下标value
- 值public Long lLen(String key)
ListCommands
key
- Keypublic Long lLen(byte[] key)
ListCommands
key
- Keypublic List<String> lRange(String key, long start, long end)
ListCommands
key
- Keystart
- 开始位置end
- 结束位置public List<byte[]> lRange(byte[] key, long start, long end)
ListCommands
key
- Keystart
- 开始位置end
- 结束位置public Long lPos(String key, String element)
ListCommands
key
- Keyelement
- 成员public Long lPos(byte[] key, byte[] element)
ListCommands
key
- Keyelement
- 成员public Long lPos(String key, String element, ListCommands.LPosArgument lPosArgument)
ListCommands
key
- Keyelement
- 成员lPosArgument
- ListCommands.LPosArgument
public Long lPos(byte[] key, byte[] element, ListCommands.LPosArgument lPosArgument)
ListCommands
key
- Keyelement
- 成员lPosArgument
- ListCommands.LPosArgument
public List<Long> lPos(String key, String element, ListCommands.LPosArgument lPosArgument, long count)
ListCommands
key
- Keyelement
- 成员lPosArgument
- ListCommands.LPosArgument
count
- 返回数量public List<Long> lPos(byte[] key, byte[] element, ListCommands.LPosArgument lPosArgument, long count)
ListCommands
key
- Keyelement
- 成员lPosArgument
- ListCommands.LPosArgument
count
- 返回数量public Long lRem(String key, String value, long count)
ListCommands
key
- Keyvalue
- 值count
- 移除个数public Long lRem(byte[] key, byte[] value, long count)
ListCommands
key
- Keyvalue
- 值count
- 移除个数public com.buession.lang.Status lTrim(String key, long start, long end)
ListCommands
key
- Keystart
- 开始位置end
- 结束位置public com.buession.lang.Status lTrim(byte[] key, long start, long end)
ListCommands
key
- Keystart
- 开始位置end
- 结束位置public String lMove(String key, String destKey, Direction from, Direction to)
ListCommands
key
- KeydestKey
- 目标 Keyfrom
- 第一个或最后一个元素to
- 第一个或最后一个元素public byte[] lMove(byte[] key, byte[] destKey, Direction from, Direction to)
ListCommands
key
- KeydestKey
- 目标 Keyfrom
- 第一个或最后一个元素to
- 第一个或最后一个元素public String blMove(String key, String destKey, Direction from, Direction to, int timeout)
ListCommands
key
- KeydestKey
- 目标 Keyfrom
- 第一个或最后一个元素to
- 第一个或最后一个元素timeout
- 超时时间public byte[] blMove(byte[] key, byte[] destKey, Direction from, Direction to, int timeout)
ListCommands
key
- KeydestKey
- 目标 Keyfrom
- 第一个或最后一个元素to
- 第一个或最后一个元素timeout
- 超时时间public List<String> blPop(String[] keys, int timeout)
ListCommands
keys
- 一个或多个 keytimeout
- 超时时间public List<byte[]> blPop(byte[][] keys, int timeout)
ListCommands
keys
- 一个或多个 keytimeout
- 超时时间public List<String> brPop(String[] keys, int timeout)
ListCommands
keys
- 一个或多个 keytimeout
- 超时时间(单位:秒)public List<byte[]> brPop(byte[][] keys, int timeout)
ListCommands
keys
- 一个或多个 keytimeout
- 超时时间(单位:秒)public String brPoplPush(String key, String destKey, int timeout)
ListCommands
key
- KeydestKey
- 目标 Keytimeout
- 超时时间(单位:秒)public byte[] brPoplPush(byte[] key, byte[] destKey, int timeout)
ListCommands
key
- KeydestKey
- 目标 Keytimeout
- 超时时间(单位:秒)public String lPop(String key)
ListCommands
key
- Keypublic byte[] lPop(byte[] key)
ListCommands
key
- Keypublic Long lPush(String key, String... values)
ListCommands
key
- Keyvalues
- 一个或多个值public Long lPush(byte[] key, byte[]... values)
ListCommands
key
- Keyvalues
- 一个或多个值public Long lPushX(String key, String... values)
ListCommands
key
- Keyvalues
- 一个或多个值public Long lPushX(byte[] key, byte[]... values)
ListCommands
key
- Keyvalues
- 一个或多个值public String rPop(String key)
ListCommands
key
- Keypublic byte[] rPop(byte[] key)
ListCommands
key
- Keypublic String rPoplPush(String key, String destKey)
ListCommands
key
- KeydestKey
- 目标 Keypublic byte[] rPoplPush(byte[] key, byte[] destKey)
ListCommands
key
- KeydestKey
- 目标 Keypublic Long rPush(String key, String... values)
ListCommands
key
- Keyvalues
- 一个或多个值public Long rPush(byte[] key, byte[]... values)
ListCommands
key
- Keyvalues
- 一个或多个值public Long rPushX(String key, String... values)
ListCommands
key
- Keyvalues
- 一个或多个值public Long rPushX(byte[] key, byte[]... values)
ListCommands
key
- Keyvalues
- 一个或多个值Copyright © 2022 buession.com Inc.. All rights reserved.