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