jedis

作者: 竞技等级几点叫你你呢 | 来源:发表于2017-09-05 16:42 被阅读0次

https://github.com/xetorthio/jedis jedis

使用

连接

Jedis jedis = new Jedis(host, port);
jedis.auth(password)

key

#pattern 为 * , 返回所有的key
Set<String> keys(String pattern)

String

set(String key, String value)
append(String key, String value)
del(String key);
get(String key)
type(String key)
exists(String key)
substr(String key, int start, int end)

List

#尾部添加value
rpush(String key, String... strings)    
#头部添加value
lpush(String key, String... strings)    
#返回list的长度
llen(String key)     
# 名称为key的,start-end之间的元素,end为 -1 时表示获取所有                 
lrange(String key, long start, long end)
#截取 start-end 之间的元素,成功返回 ok
ltrim(String key, long start, long end)

Set


Hash


相关文章

网友评论

      本文标题:jedis

      本文链接:https://www.haomeiwen.com/subject/iahujxtx.html