gpt4 book ai didi

proj.zoie.api.Zoie类的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 04:02:31 36 4
gpt4 key购买 nike

本文整理了Java中proj.zoie.api.Zoie类的一些代码示例,展示了Zoie类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zoie类的具体详情如下:
包路径:proj.zoie.api.Zoie
类名称:Zoie

Zoie介绍

暂无

代码示例

代码示例来源:origin: senseidb/zoie

@Override
public void consume(Collection<DataEvent<D>> data) throws ZoieException {
 if (_zoieTwo != null) {
  _zoieTwo.consume(data);
 }
}

代码示例来源:origin: senseidb/zoie

@Override
public String getVersion() {
 String v1 = null, v2 = null;
 Zoie<R, D> zoieOne = _zoieOne;
 if (zoieOne != null) {
  v1 = zoieOne.getVersion();
 }
 if (_zoieTwo != null) {
  v2 = _zoieTwo.getVersion();
 }
 return _zoieConfig.getVersionComparator().compare(v2, v1) > 0 ? v2 : v1;
}

代码示例来源:origin: senseidb/zoie

@Override
public void shutdown() {
 _running = false;
 Zoie<R, D> zoieOne = _zoieOne;
 if (zoieOne != null) {
  zoieOne.shutdown();
 }
 if (_zoieTwo != null) {
  _zoieTwo.shutdown();
 }
}

代码示例来源:origin: com.linkedin.zoie/zoie-core

IndexSearcher searcher = null;
QueryParser parser = null;
parser = new QueryParser(Version.LUCENE_34, field, zoie.getAnalyzer());
parser.setAllowLeadingWildcard(true);
Query q = null;
try
 readers = zoie.getIndexReaders();
 retstr += readers.size() + " readers obtained\n";
 for (int readerid = 0; readerid < readers.size(); readerid++)
} finally
 zoie.returnIndexReaders(readers);

代码示例来源:origin: com.linkedin.zoie/zoie-core

try
 readers = zoie.getIndexReaders();
 retstr += readers.size() + " readers obtained\n";
 for (int readerid = 0; readerid < readers.size(); readerid++)
} finally
 zoie.returnIndexReaders(readers);

代码示例来源:origin: senseidb/zoie

@Override
public void start() {
 _running = true;
 Zoie<R, D> zoieOne = _zoieOne;
 if (zoieOne != null) {
  zoieOne.start();
 }
 if (_zoieTwo != null) {
  _zoieTwo.start();
 }
}

代码示例来源:origin: com.senseidb/sensei-core

String[] mbeannames = zoieSystem.getStandardMBeanNames();
for (String name : mbeannames) {
 JmxUtil.registerMBean(zoieSystem.getStandardMBean(name), "zoie-name", name + "-" + _id
   + "-" + part);
 zoieSystem.start();
 zoieSystems.add(zoieSystem);

代码示例来源:origin: senseidb/zoie

@Override
public void syncWithVersion(long timeInMillis, String version) throws ZoieException {
 if (_zoieTwo != null) {
  _zoieTwo.syncWithVersion(timeInMillis, version);
 }
}

代码示例来源:origin: com.senseidb.zoie/zoie-core

@Override
public List<ZoieMultiReader<R>> getIndexReaders() throws IOException {
 List<ZoieMultiReader<R>> readers = new ArrayList<ZoieMultiReader<R>>();
 if (_zoieTwo != null) {
  readers.addAll(_zoieTwo.getIndexReaders());
 }
 Zoie<R, D> zoieOne = _zoieOne;
 if (zoieOne != null) {
  List<ZoieMultiReader<R>> zoieOneReaders = zoieOne.getIndexReaders();
  for (ZoieMultiReader<R> r : zoieOneReaders) {
   synchronized (_activeReaders) {
    ZoieRef zoieRef = _activeReaders.get(r);
    if (zoieRef != null) ++zoieRef.refCount;
    else {
     zoieRef = new ZoieRef(zoieOne);
     _activeReaders.put(r, zoieRef);
    }
   }
  }
  readers.addAll(zoieOneReaders);
 }
 return readers;
}

代码示例来源: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: senseidb/zoie

@Override
public String getCurrentReaderVersion() {
 String v1 = null, v2 = null;
 Zoie<R, D> zoieOne = _zoieOne;
 if (zoieOne != null) {
  v1 = zoieOne.getCurrentReaderVersion();
 }
 if (_zoieTwo != null) {
  v2 = _zoieTwo.getCurrentReaderVersion();
 }
 return _zoieConfig.getVersionComparator().compare(v2, v1) > 0 ? v2 : v1;
}

代码示例来源:origin: senseidb/zoie

@Override
public void flushEvents(long timeout) throws ZoieException {
 if (_zoieTwo != null) {
  _zoieTwo.flushEvents(timeout);
 }
}

代码示例来源:origin: com.senseidb/sensei-core

List<ZoieMultiReader<BoboSegmentReader>> readers;
try {
 readers = zoie.getIndexReaders();
} catch (Exception e) {
 logger.error(e.getMessage(), e);
 return null;
} finally {
 zoie.returnIndexReaders(readers);

代码示例来源:origin: com.linkedin.zoie/zoie-core

public void start()
{
 _running = true;
 Zoie zoieOne = _zoieOne;
 if (zoieOne != null)
  zoieOne.start();
 if (_zoieTwo != null)
  _zoieTwo.start();
}

代码示例来源:origin: com.senseidb.zoie/zoie-core

@Override
public void syncWithVersion(long timeInMillis, String version) throws ZoieException {
 if (_zoieTwo != null) {
  _zoieTwo.syncWithVersion(timeInMillis, version);
 }
}

代码示例来源:origin: senseidb/zoie

@Override
public List<ZoieMultiReader<R>> getIndexReaders() throws IOException {
 List<ZoieMultiReader<R>> readers = new ArrayList<ZoieMultiReader<R>>();
 if (_zoieTwo != null) {
  readers.addAll(_zoieTwo.getIndexReaders());
 }
 Zoie<R, D> zoieOne = _zoieOne;
 if (zoieOne != null) {
  List<ZoieMultiReader<R>> zoieOneReaders = zoieOne.getIndexReaders();
  for (ZoieMultiReader<R> r : zoieOneReaders) {
   synchronized (_activeReaders) {
    ZoieRef zoieRef = _activeReaders.get(r);
    if (zoieRef != null) ++zoieRef.refCount;
    else {
     zoieRef = new ZoieRef(zoieOne);
     _activeReaders.put(r, zoieRef);
    }
   }
  }
  readers.addAll(zoieOneReaders);
 }
 return readers;
}

代码示例来源: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

@Override
public String getCurrentReaderVersion()
{
 String v1 = null, v2 = null;
 Zoie zoieOne = _zoieOne;
 if (zoieOne != null)
  v1 = zoieOne.getCurrentReaderVersion();
 if (_zoieTwo != null)
  v2 = _zoieTwo.getCurrentReaderVersion();
 return _zoieConfig.getVersionComparator().compare(v2, v1) > 0 ? v2 : v1;
}

代码示例来源:origin: com.senseidb.zoie/zoie-core

@Override
public void flushEvents(long timeout) throws ZoieException {
 if (_zoieTwo != null) {
  _zoieTwo.flushEvents(timeout);
 }
}

代码示例来源:origin: com.senseidb.zoie/zoie-core

@Override
public void shutdown() {
 _running = false;
 Zoie<R, D> zoieOne = _zoieOne;
 if (zoieOne != null) {
  zoieOne.shutdown();
 }
 if (_zoieTwo != null) {
  _zoieTwo.shutdown();
 }
}

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com