当前位置: 首页>>代码示例>>Java>>正文


Java InfoStream.NO_OUTPUT属性代码示例

本文整理汇总了Java中org.apache.lucene.util.InfoStream.NO_OUTPUT属性的典型用法代码示例。如果您正苦于以下问题:Java InfoStream.NO_OUTPUT属性的具体用法?Java InfoStream.NO_OUTPUT怎么用?Java InfoStream.NO_OUTPUT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.lucene.util.InfoStream的用法示例。


在下文中一共展示了InfoStream.NO_OUTPUT属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setInfoStream

/** Sets the {@link InfoStream} to use for logging messages. */
public void setInfoStream(InfoStream infoStream) {
  if (infoStream == null) {
    infoStream = InfoStream.NO_OUTPUT;
  }
  this.infoStream = infoStream;
}
 
开发者ID:europeana,项目名称:search,代码行数:7,代码来源:IndexAndTaxonomyReplicationHandler.java

示例2: newIndexUpgrader

/**
 * Randomizes the use of some of hte constructor variations
 */
private static IndexUpgrader newIndexUpgrader(Directory dir) {
  final boolean streamType = random().nextBoolean();
  final int choice = TestUtil.nextInt(random(), 0, 2);
  switch (choice) {
    case 0: return new IndexUpgrader(dir, TEST_VERSION_CURRENT);
    case 1: return new IndexUpgrader(dir, TEST_VERSION_CURRENT, 
                                     streamType ? null : InfoStream.NO_OUTPUT, false);
    case 2: return new IndexUpgrader(dir, newIndexWriterConfig(null), false);
    default: fail("case statement didn't get updated when random bounds changed");
  }
  return null; // never get here
}
 
开发者ID:europeana,项目名称:search,代码行数:15,代码来源:TestBackwardsCompatibility.java

示例3: toInfoStream

private static InfoStream toInfoStream(SolrIndexConfig config) throws IOException {
  String infoStreamFile = config.infoStreamFile;
  if (infoStreamFile != null) {
    File f = new File(infoStreamFile);
    File parent = f.getParentFile();
    if (parent != null) parent.mkdirs();
    FileOutputStream fos = new FileOutputStream(f, true);
    return new PrintStreamInfoStream(new PrintStream(fos, true, "UTF-8"));
  } else {
    return InfoStream.NO_OUTPUT;
  }
}
 
开发者ID:pkarmstr,项目名称:NYBC,代码行数:12,代码来源:SolrIndexWriter.java


注:本文中的org.apache.lucene.util.InfoStream.NO_OUTPUT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。