本文整理汇总了Java中org.nex.util.LRUCache类的典型用法代码示例。如果您正苦于以下问题:Java LRUCache类的具体用法?Java LRUCache怎么用?Java LRUCache使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LRUCache类属于org.nex.util包,在下文中一共展示了LRUCache类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: JSONDocStoreTopicMapProvider
import org.nex.util.LRUCache; //导入依赖的package包/类
/**
* Constructor
* @param env
* @param cachesize
*/
public JSONDocStoreTopicMapProvider(JSONTopicmapEnvironment env, int cachesize) throws Exception {
environment = env;
jsonEnvironment = environment.getJSONEnvironment();
jsonModel = jsonEnvironment.getModel();
citationModel = new CitationModel(environment,_model);
nodeCache = new LRUCache(cachesize); //new ConcurrentLRUCache(cachesize);
//maybe not sending in a merge engine
//The theory being that an external merge engine
// will be at work
_model = new NodeModel(environment,this, null,cachesize);
tupleQuery = new TupleQuery(this, jsonModel);
exporter = new TopicMapXMLExporter(this);
interceptor = new MergeInterceptor();
credentialUtil = new CredentialUtility(this,jsonModel);
//environment.logDebug("JSONDocStoreTopicMapProvider.init "+environment+" "+jsonEnvironment+" "+jsonModel);
}
示例2: SolrDataProvider
import org.nex.util.LRUCache; //导入依赖的package包/类
/**
* @param cacheSize
*
*/
public SolrDataProvider(SolrEnvironment e, int cacheSize) throws Exception {
client = e.getSolrClient();
exporter = new SolrExporter(this);
nodeCache = new LRUCache(cacheSize);
tupleQuery = new SolrTupleQuery(this);
//default NO MERGE model
_model = new SolrNodeModel(this,null);
}