![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
redis基础
小胖超凶哦!
睡觉了,别学了!
展开
-
Redis API (List,Hash,Set,Sortset)
q原创 2022-03-23 21:27:20 · 437 阅读 · 0 评论 -
Redis API BitMap,枚举
enum Season { //枚举:一组常量 //定义一年四季:Spring,Summer,Autumn,Winter Spring,Summer,Autumn,Winter } class SeasonNew{ //枚举:一组常量 //定义一年四季:Spring,Summer,Autumn,Winter public static final String Spring="Spring"; public static final String S.原创 2022-03-23 20:41:35 · 1196 阅读 · 0 评论 -
Redis API String
package com.shujia; import redis.clients.jedis.Jedis; public class Demo01TestRedisConn { public static void main(String[] args) { //建立连接 Jedis jedis = new Jedis("master",6379); String set = jedis.set("K1", "V1"); Sys.原创 2022-03-23 19:42:27 · 905 阅读 · 0 评论 -
Redis持久化
Redis持久化-RDB 127.0.0.1:6379> config get dir 1) "dir" 2) "/" [root@master ~]# cd / [root@master /]# ls a boot dump.rdb home lib64 mnt proc run srv tmp var bin dev etc lib media opt root sbin sys usr 127.0.0.1:6379> ke原创 2022-03-20 20:58:18 · 1262 阅读 · 0 评论 -
SortedSet
SortedSet 127.0.0.1:6379> help zadd ZADD key [NX|XX] [GT|LT] [CH] [INCR] score member [score member ...] summary: Add one or more members to a sorted set, or update its score if it already exists since: 1.2.0 group: sorted_set 127.0.0.1:6379原创 2022-03-19 17:04:47 · 380 阅读 · 0 评论 -
set操作
set 127.0.0.1:6379> sadd set1 1 2 3 4 4 5 5 6 6 7 8 (integer) 8 127.0.0.1:6379> type set1 set 127.0.0.1:6379> smembers set1 1) "1" 2) "2" 3) "3" 4) "4" 5) "5" 6) "6" 7) "7" 8) "8" 127.0.0.1:6379> sismember set1 5 (integer) 1 127.0.0.1:6379>原创 2022-03-19 15:23:34 · 270 阅读 · 0 评论 -
Hash操作
Hash 127.0.0.1:6379> hset hash1 name zhangsan (integer) 1 127.0.0.1:6379> type hash1 hash 127.0.0.1:6379> hset hash1 name zhangsan1 age 18 gender nan clazz 001 (integer) 3 127.0.0.1:6379> hlen hash1 (integer) 4 127.0.0.1:6379> hexists hash原创 2022-03-19 14:43:26 · 581 阅读 · 0 评论 -
List操作
List原创 2022-03-19 11:20:46 · 402 阅读 · 0 评论 -
位图bitmap
位图bitmap 127.0.0.1:6379> setbit b1 0 1 (integer) 0 127.0.0.1:6379> get b1 "\x80" 127.0.0.1:6379> setbit b2 20 1 (integer) 0 127.0.0.1:6379> get b2 "\x00\x00\b" 127.0.0.1:6379> setbit b3 31 1 (integer) 0 127.0.0.1:6379> get b3 "\x00\x00\原创 2022-03-19 10:19:45 · 335 阅读 · 0 评论 -
redis操作
master:6379> help redis-cli 6.2.6 To get help about Redis commands type: "help @<group>" to get a list of commands in <group> "help <command>" for help on <command> "help <tab>" to get a list of possible .原创 2022-03-18 22:12:18 · 2631 阅读 · 0 评论 -
redis配置
[root@master ~]# yum install lrzsz 已加载插件:fastestmirror, langpacks Determining fastest mirrors base | 3.6 kB 00:00 extras | 2.9 kB 00:00 updates .原创 2022-03-18 21:16:47 · 952 阅读 · 0 评论