摘要:
solr的缓存策略分3种LRUCache:使用LinkedHashMap来保存缓存,覆盖了removeEldestEntry方法,并提供了预热方法: public void warm(SolrIndexSearcher searcher, SolrCache<K,V> old) { if (regenerator==null) return; long warmingStartTime = System.currentTimeMillis(); LRUCache<K,V> other = (LRUCache<K,V>)old; // warm entries 阅读全文
posted @ 2013-01-21 13:34
镆涵
阅读(361)
评论(0)
推荐(0)
摘要:
这是我的另外一篇博客 和http://blog.csdn.net/zhang_mohan 比较看哪个好使 就最终选哪个试试代码效果 1 synchronized (getUpdateLock()) { 2 cmdExecutor.ensureExists(CLUSTER_STATE, zkClient); 3 4 log.info("Updating cluster state from ZooKeeper... "); 5 6 zkClient.exists(CLUSTER_STATE, new Watcher()... 阅读全文
posted @ 2013-01-21 13:11
镆涵
阅读(379)
评论(0)
推荐(0)
浙公网安备 33010602011771号