上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 41 下一页

2021年1月27日

Redis SetNx 同时设置过期时间

摘要: set k1 value22 EX 100 NX 阅读全文

posted @ 2021-01-27 15:30 MaXianZhe 阅读(4435) 评论(0) 推荐(1) 编辑

如何用ZK实现分布式锁

摘要: public class BaseDistributedLock { private final ZkClientExt client; private final String path; private final String basePath; private final String lo 阅读全文

posted @ 2021-01-27 14:50 MaXianZhe 阅读(205) 评论(0) 推荐(0) 编辑

Netty样例之如何使用LengthFieldBasedFrameDecoder

摘要: 一 客户端 public class NewClient { private int port; private String address; public NewClient(int port,String address) { this.port = port; this.address = 阅读全文

posted @ 2021-01-27 12:12 MaXianZhe 阅读(497) 评论(0) 推荐(0) 编辑

大端序和小端序

摘要: 计算机硬件有两种储存数据的方式:大端字节序(big endian)和小端字节序(little endian)。 举例来说,数值0x2211使用两个字节储存:高位字节是0x22,低位字节是0x11。 大端字节序:高位字节在前,低位字节在后,这是人类读写数值的方法。小端字节序:低位字节在前,高位字节在后 阅读全文

posted @ 2021-01-27 11:31 MaXianZhe 阅读(575) 评论(0) 推荐(0) 编辑

SpringBoot整合redis

摘要: 先上代码 一 添加依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <!-- lettuc 阅读全文

posted @ 2021-01-27 10:59 MaXianZhe 阅读(247) 评论(0) 推荐(0) 编辑

2021年1月26日

如何用Maven打war包

摘要: 我的控制台代码就是打的war包 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ma 阅读全文

posted @ 2021-01-26 22:11 MaXianZhe 阅读(396) 评论(0) 推荐(0) 编辑

Maven之如何用assembly插件打jar包

摘要: maven-assembly-plugin有什么好处呢? 英文原文:The Assembly Plugin for Maven is primarily intended to allow users to aggregate the project output along with its de 阅读全文

posted @ 2021-01-26 22:07 MaXianZhe 阅读(272) 评论(0) 推荐(0) 编辑

Kafka之常用API代码示例

摘要: 其实Kafka作为一款消息队列,本身的api并不多,也不复杂,本文列举出来生产者和消费者常见的api public class KafkaTestProduer { public static final Logger logger = LoggerFactory.getLogger(KafkaTe 阅读全文

posted @ 2021-01-26 17:44 MaXianZhe 阅读(295) 评论(0) 推荐(0) 编辑

Redis之HyperLoglog

摘要: Redis HyperLogLog 是用来做基数统计的算法,HyperLogLog 的优点是,在输入元素的数量或者体积非常非常大时,计算基数所需的空间总是固定 的、并且是很小的。 在 Redis 里面,每个 HyperLogLog 键只需要花费 12 KB 内存,就可以计算接近 2^64 个不同元素 阅读全文

posted @ 2021-01-26 16:26 MaXianZhe 阅读(97) 评论(0) 推荐(0) 编辑

Mycat面试知识点总结

摘要: 现在的面试越来越变态了,不少公司还是会考分库分表的,倒不一定会考多深,但是如果一点答不上来那就让面试官的印象很差,本文是自己搭建mycat的经验外加参考网上他人的经验写成,目的很简单应付面试的。 一 Mycat基本概念 先看schema.xml这个配置文件 <mycat:schema xmlns:m 阅读全文

posted @ 2021-01-26 15:25 MaXianZhe 阅读(509) 评论(0) 推荐(0) 编辑

上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 41 下一页

导航