SOFAJRaft 日志复制 - pipeline 实现剖析 | SOFAJRaft 实现原理
<blockquote<strongSOFAStack</strong(<strongS</strongcalable<strongO</strongpen<strongF</stronginancial <strongA</strongrchitectureStac
<blockquote<strongSOFAStack</strong(<strongS</strongcalable<strongO</strongpen<strongF</stronginancial <strongA</strongrchitectureStac
!策略模式(/img/bVbugi7?w800&h600)<blockquote策略模式:定义一系列的算法,把它们一个个封装起来,并且使它们可以相互替换</blockquote生活小栗子:诸葛锦囊诸葛给刘备的锦囊妙计,遇到任何困难都有应对计策。策略模式实现的也是类似
1、减少dom操作:类数组是实时更新的类数组集合,在脚本中document.images、document.forms、getElementsByTagName()返回的都是HTMLCollection类型的集合,常见的类数组还有arguments对象和DOM方法的返回结果。对这些类数组集合操