摘要:
@Overrideprotected <T> Invoker<T> doSelect(List<Invoker<T>> invokers, URL url, Invocation invocation) { String key = invokers.get(0).getUrl().getServi 阅读全文
posted @ 2019-01-09 11:31 21004129 阅读(703) 评论(0) 推荐(0)
|
摘要:
@Overrideprotected <T> Invoker<T> doSelect(List<Invoker<T>> invokers, URL url, Invocation invocation) { String key = invokers.get(0).getUrl().getServi 阅读全文
posted @ 2019-01-09 11:31 21004129 阅读(703) 评论(0) 推荐(0)
摘要:
/** * random load balance. * */public class RandomLoadBalance extends AbstractLoadBalance { public static final String NAME = "random"; @Override prot 阅读全文
posted @ 2019-01-08 20:22 21004129 阅读(355) 评论(0) 推荐(0)
摘要:
jdk1.8 HashMap数据结构 图1-HashMap类图 图2-TreeNode类图 由图1-HashMap类图可知HashMap底层数据结构是由一个Node<K,V>的数组构成。具体Node<K,V>究竟是何数据结构暂且不讨论,先看一下HashMap最重要的两个方法之一put()方法的具体实 阅读全文
posted @ 2019-01-06 00:29 21004129 阅读(149) 评论(0) 推荐(1)
摘要:
OutOfMemoryError示例代码package com.walson.heap;import java.util.ArrayList;import java.util.List;/*** java 堆溢出* * -verbose:gc -Xms20m -Xmx20m -XX:+HeapDum... 阅读全文
posted @ 2014-08-14 17:22 21004129 阅读(1621) 评论(0) 推荐(0)
摘要:
方法一通过super.setBaseDao方法设置父类私有变量父类public class BaseServiceImpl { private BaseDao baseDao; public BaseDao getBaseDao() { return baseDao; } public void ... 阅读全文
posted @ 2014-08-07 17:18 21004129 阅读(8989) 评论(0) 推荐(0)
摘要:
自定义annotation@Documented@Retention(RetentionPolicy.RUNTIME)@Target({ElementType.FIELD,ElementType.METHOD,ElementType.TYPE})public @interface TestAnnot... 阅读全文
posted @ 2014-08-06 17:31 21004129 阅读(265) 评论(1) 推荐(1) |
||