本文整理了Java中proj.zoie.api.Zoie.returnIndexReaders()
方法的一些代码示例,展示了Zoie.returnIndexReaders()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zoie.returnIndexReaders()
方法的具体详情如下:
包路径:proj.zoie.api.Zoie
类名称:Zoie
方法名:returnIndexReaders
暂无
代码示例来源:origin: senseidb/zoie
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void returnIndexReaders(List<ZoieMultiReader<R>> readers) {
if (readers != null) {
Map<Zoie<R, D>, List<ZoieMultiReader<R>>> destMap = new HashMap<Zoie<R, D>, List<ZoieMultiReader<R>>>();
for (ZoieMultiReader<R> r : readers) {
Zoie zoie = _zoieTwo;
synchronized (_activeReaders) {
ZoieRef zoieRef = _activeReaders.get(r);
if (zoieRef != null) {
zoie = zoieRef.zoie;
--zoieRef.refCount;
if (zoieRef.refCount <= 0) _activeReaders.remove(r);
}
}
List<ZoieMultiReader<R>> readerList = destMap.get(zoie);
if (readerList == null) {
readerList = new ArrayList<ZoieMultiReader<R>>();
destMap.put(zoie, readerList);
}
readerList.add(r);
}
for (Map.Entry<Zoie<R, D>, List<ZoieMultiReader<R>>> entry : destMap.entrySet()) {
entry.getKey().returnIndexReaders(entry.getValue());
}
}
}
代码示例来源:origin: com.senseidb.zoie/zoie-core
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void returnIndexReaders(List<ZoieMultiReader<R>> readers) {
if (readers != null) {
Map<Zoie<R, D>, List<ZoieMultiReader<R>>> destMap = new HashMap<Zoie<R, D>, List<ZoieMultiReader<R>>>();
for (ZoieMultiReader<R> r : readers) {
Zoie zoie = _zoieTwo;
synchronized (_activeReaders) {
ZoieRef zoieRef = _activeReaders.get(r);
if (zoieRef != null) {
zoie = zoieRef.zoie;
--zoieRef.refCount;
if (zoieRef.refCount <= 0) _activeReaders.remove(r);
}
}
List<ZoieMultiReader<R>> readerList = destMap.get(zoie);
if (readerList == null) {
readerList = new ArrayList<ZoieMultiReader<R>>();
destMap.put(zoie, readerList);
}
readerList.add(r);
}
for (Map.Entry<Zoie<R, D>, List<ZoieMultiReader<R>>> entry : destMap.entrySet()) {
entry.getKey().returnIndexReaders(entry.getValue());
}
}
}
代码示例来源:origin: com.linkedin.zoie/zoie-core
entry.getKey().returnIndexReaders(entry.getValue());
代码示例来源:origin: com.linkedin.zoie/zoie-core
} finally
zoie.returnIndexReaders(readers);
代码示例来源:origin: com.senseidb/sensei-core
return null;
} finally {
zoie.returnIndexReaders(readers);
代码示例来源:origin: com.linkedin.zoie/zoie-core
} finally
zoie.returnIndexReaders(readers);
内容来源于网络,如有侵权,请联系作者删除!