This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Token | |
| { | |
| private $mmc; | |
| private $cache_time; | |
| function __construct() | |
| { | |
| $this->cache_time = 60 * 60 * 24; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 城的灯 | |
| http://www.yangguo.info/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Singleton { | |
| private static final AtomicReference<Singleton> INSTANCE = new AtomicReference<Singleton>(); | |
| private Singleton() {} | |
| public static Singleton getInstance() { | |
| for (;;) { | |
| Singleton singleton = INSTANCE.get(); | |
| if (null != singleton) { | |
| return singleton; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Created by JackSun on 2017/5/25. | |
| * | |
| * Connect Me. admin@jacksun.me | |
| */ | |
| public class KKThreadHelp { | |
| // 计算类型 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Slf4j | |
| public abstract class AbsTimerItem { | |
| private static final long MIN_TIMEOUT_MILLIS = 1L; | |
| private HashedWheelTimer timer; | |
| private long readerIdleTimeMillis; | |
| private long writerIdleTimeMillis; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 定期回收心跳的数据 | |
| */ | |
| public class PoolItemService { | |
| final static HashedWheelTimer TIMER = new HashedWheelTimer(KKThreadFactory.getInstance("MOTimer", 1)); | |
| private ManageClientServiceService manageClientService; | |
| public PoolItemService(ManageClientServiceService iTimerToHeat) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 生成 dhparam.pem 文件, 在命令行执行任一方法: | |
| # 方法1: 很慢 | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 | |
| # 方法2: 较快 | |
| # 与方法1无明显区别. 2048位也足够用, 4096更强 | |
| openssl dhparam -dsaparam -out /etc/nginx/ssl/dhparam.pem 4096 |
OlderNewer