上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 50 下一页
摘要: 说明 从业务概念上,有些数据在系统中只应该保存一份,就比较适合设计为单例类。比如,系统的配置信息类。除此之外,我们还可以使用单例解决资源访问冲突的问题。 饿汉式 在类加载的时候就创建 public class IdGenerator { private AtomicLong id = new Ato 阅读全文
posted @ 2020-03-25 13:54 意犹未尽 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 挖矿病毒 排查 今天上线发现linux cpu飙升到100% 输入top -c 命令找到最号cpu的进程 top -c 2.使用 kill -9后 几秒会后 又起起来了 3.输入命令 ls -l /proc/{pid号}/exe 4. 我们进入etc目录下面看看 5.发现里面有个update.sh脚 阅读全文
posted @ 2020-03-20 15:09 意犹未尽 阅读(4450) 评论(0) 推荐(0) 编辑
摘要: ReferenceConfig createProxy 参见《dubbo源码阅读-服务订阅(八)之主流程》 rivate T createProxy(Map<String, String> map) { URL tmpUrl = new URL("temp", "localhost", 0, map 阅读全文
posted @ 2020-03-20 09:57 意犹未尽 阅读(381) 评论(0) 推荐(0) 编辑
摘要: 类图 服务注册 RegistryProtocol <1>register 参见《dubbo源码阅读-服务暴露(七)之远程暴露(dubbo)》 public void register(URL registryUrl, URL registedProviderUrl) { //<2>SPI扩展点 此时 阅读全文
posted @ 2020-03-19 10:23 意犹未尽 阅读(610) 评论(0) 推荐(0) 编辑
摘要: 接口定义 @SPI("netty") //缺省值netty public interface Transporter { /** * Bind a server. * * @param url erver url * @param handler * @return server * @throws 阅读全文
posted @ 2020-03-18 15:15 意犹未尽 阅读(499) 评论(0) 推荐(0) 编辑
摘要: 接口定义 @SPI(HeaderExchanger.NAME)//缺省值为header public interface Exchanger { /** * bind. * * @param url * @param handler * @return message server */ @Adap 阅读全文
posted @ 2020-03-18 14:28 意犹未尽 阅读(430) 评论(0) 推荐(0) 编辑
摘要: 使用例子 <dubbo:service interface="com.alibaba.dubbo.demo.DemoService" ref="demoServiceImpl" protocol="injvm" scope="local" /> 本地如何引用 ReferenceConfig#crea 阅读全文
posted @ 2020-03-17 14:25 意犹未尽 阅读(435) 评论(0) 推荐(0) 编辑
摘要: 说明 Wrapper调用时机可以看:https://www.cnblogs.com/LQBlog/p/12470179.html#autoid-2-0-0 /** * StubProxyFactoryWrapper */ public class StubProxyFactoryWrapper im 阅读全文
posted @ 2020-03-17 13:40 意犹未尽 阅读(383) 评论(0) 推荐(0) 编辑
摘要: 说明 详见《dubbo源码阅读-ProxyFactory(十一)之JdkProxyFactory》 接口定义 详见《dubbo源码阅读-ProxyFactory(十一)之JdkProxyFactory》 类图 JavassistProxyFactory /** * JavaassistRpcProx 阅读全文
posted @ 2020-03-17 11:44 意犹未尽 阅读(461) 评论(0) 推荐(0) 编辑
摘要: 接口定义 /** * ProxyFactory. (API/SPI, Singleton, ThreadSafe) */ @SPI("javassist") //缺省值是javasist public interface ProxyFactory { /** * create proxy. * 需要 阅读全文
posted @ 2020-03-17 10:31 意犹未尽 阅读(657) 评论(0) 推荐(0) 编辑
上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 50 下一页