摘要: 基于Redis的延时任务队列时间 参考有赞延迟队列设计 源码地址: https://gitee.com/A_yes/big-smart 主要组成部分 1. DelayJobBucket 数据结构 redis的 zset(有序集合)用于存放任务的id 并按照执行时间排序 2. JobPoll 数据结构 阅读全文
posted @ 2020-08-14 11:21 A_yes 阅读(308) 评论(0) 推荐(0) 编辑
摘要: 1. 使用方法2. 源码解析构造方法设定任务举例3. 总结 Timer 1. 使用方法 public class TimerTest { public static void main(String[] args) { Timer timer = new Timer(); System.out.fo 阅读全文
posted @ 2020-07-30 15:47 A_yes 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 1. 使用方法 2. 源码解析 入队 出队 3. 总结 DelayQueue 1. 使用方法 DelayQueue中的元素要实现Delayed接口,Delayed接口又实现了 Comparable接口 public interface Delayed extends Comparable<Delay 阅读全文
posted @ 2020-07-29 16:10 A_yes 阅读(660) 评论(0) 推荐(0) 编辑
摘要: logback配置详解 logback配置详解 官方文档 http://logback.qos.ch/manual/ 1. 根节点 - configuration 一共有三个属性 debug 当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为fal 阅读全文
posted @ 2020-07-13 13:41 A_yes 阅读(989) 评论(0) 推荐(0) 编辑
摘要: 策略(Strategy)模式的定义:该模式定... 阅读全文
posted @ 2019-12-12 08:56 A_yes 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 状态模式(State Pattern) :允... 阅读全文
posted @ 2019-12-12 08:56 A_yes 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 观察者(Observer)模式的定义:指多个... 阅读全文
posted @ 2019-12-12 08:56 A_yes 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 中介者模式(Mediator Pattern... 阅读全文
posted @ 2019-12-12 08:56 A_yes 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 命令模式(Command Pattern)是... 阅读全文
posted @ 2019-12-12 08:56 A_yes 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 小区门卡就剩一张了,去物业办一张要50块。先... 阅读全文
posted @ 2019-12-12 08:56 A_yes 阅读(653) 评论(0) 推荐(0) 编辑