本文整理汇总了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;
}
示例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
}
示例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;
}
}