本次主要用Java实现简单的游戏服务器事件通知,在游戏服中,事件通知是必不可少的一种游戏业务处理逻辑,可以基于观察者模式去编写,或则其他更好的方式。也可以用guava框架的事件通知框架,以下代码只是大概的实现思想,总体设计思路都大同小异; 1.Event注解 package ge; import j ...
分类:
编程语言 时间:
2020-07-21 14:15:17
阅读次数:
73
在网上找了很多方法,有许多命令进行了尝试 失败方案: npm cache verify npm cache clean npm cache clean --force npm i -g npm grep -ir "sha1-xxxxxxxxxxxxxxxx" ~/.npm 解决方案是: 1.删掉pa ...
分类:
其他好文 时间:
2020-07-21 13:46:43
阅读次数:
69
1.下载chrome浏览器 wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb 或者 https://www.chrome64bit.com 2.安装 gdeb apt-cache search ...
分类:
其他好文 时间:
2020-07-21 11:42:31
阅读次数:
136
https://github.com/google/guava/blob/master/guava/src/com/google/common/util/concurrent/RateLimiter.java 异常参数校验 Preconditions类 部分方法: checkArgument使用:P ...
分类:
其他好文 时间:
2020-07-20 22:29:07
阅读次数:
74
/** 请求 * @Author: xuhong * @Date: 2020/6/19 * @DESC: //TODO */ /** * 发送请求,处理请求失败 * * request(url, method, data, callback) * request(url, method, callb ...
分类:
Web程序 时间:
2020-07-20 13:11:43
阅读次数:
82
搬运自我的CSDN https://blog.csdn.net/u013213111/article/details/107031986 最近在多核ARM芯片上搞并行计算,涉及到核间数据交互,因此对多核cache coherence稍作探究。想解决的疑问是:各个核之间是否“知道”内存中的数据被其他核 ...
分类:
系统相关 时间:
2020-07-19 15:51:21
阅读次数:
172
前提条件:nginx支持ngx_http_slice_module模块 配置文件示例: #location 块的配置: location /asd/ { slice 512k; proxy_cache cache; proxy_cache_key $uri$is_args$args$slice_ra ...
分类:
其他好文 时间:
2020-07-19 00:50:36
阅读次数:
186
一,为什么要使用caffeine做本地缓存? 1,spring boot默认集成的进程内缓存在1.x时代是guava cache 在2.x时代更新成了caffeine, 功能上差别不大,但后者在性能上更胜一筹, 使用caffeine做本地缓存,取数据可以达到微秒的级别, 一次取数据用时经常不足1毫秒 ...
分类:
编程语言 时间:
2020-07-19 00:47:58
阅读次数:
94
清除buffer和cache echo 3 > /proc/sys/vm/drop_cashes 磁盘操作: 逻辑级: 文件系统,块为最小寻址单元(文件块,I/O块)每个块包含一个或多个扇区,直接缓存文件系统数据(有文件系统参与),操作对象为文件 物理级: 磁盘块,扇区为最小寻址单元(设备块) bu ...
分类:
系统相关 时间:
2020-07-18 19:46:12
阅读次数:
75
1、在application.yml配置cache-enabled: true mybatis: config-location: classpath:/mybatis-config.xml, classpath:mybatis/mybatis-config.xml mapper-locations ...
分类:
编程语言 时间:
2020-07-18 19:44:38
阅读次数:
147