摘要: Redis字典采用哈希表作为底层实现。 typedef struct dictht{ //哈希表数组 dictEntry **table; //哈希表大小 unsigned long size; //哈希表大小掩码,用于计算索引值 //总是等于size-1 unsigned long sizemas 阅读全文
posted @ 2020-04-26 23:21 Kasper 阅读(166) 评论(0) 推荐(0) 编辑
摘要: simple responsibility principle 单一职责原则。 there should never be more than one reason for a class to change. 一个类中应该只处理一个职责,而不应该同时处理多个职责。否则当出现类需要修改时,可能会导致 阅读全文
posted @ 2020-04-26 12:47 Kasper 阅读(469) 评论(0) 推荐(0) 编辑