本文整理汇总了Java中org.apache.solr.core.PluginInfo.isEnabled方法的典型用法代码示例。如果您正苦于以下问题:Java PluginInfo.isEnabled方法的具体用法?Java PluginInfo.isEnabled怎么用?Java PluginInfo.isEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.solr.core.PluginInfo
的用法示例。
在下文中一共展示了PluginInfo.isEnabled方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initLog
import org.apache.solr.core.PluginInfo; //导入方法依赖的package包/类
private void initLog(PluginInfo ulogPluginInfo) {
if (ulogPluginInfo != null && ulogPluginInfo.isEnabled()) {
ulog = new UpdateLog();
ulog.init(ulogPluginInfo);
// ulog = core.createInitInstance(ulogPluginInfo, UpdateLog.class, "update log", "solr.NullUpdateLog");
ulog.init(this, core);
}
}
示例2: initLog
import org.apache.solr.core.PluginInfo; //导入方法依赖的package包/类
private void initLog(PluginInfo ulogPluginInfo) {
if(ulogPluginInfo != null && ulogPluginInfo.isEnabled()) {
ulog = new UpdateLog();
ulog.init(ulogPluginInfo);
// ulog = core.createInitInstance(ulogPluginInfo, UpdateLog.class, "update log", "solr.NullUpdateLog");
ulog.init(this, core);
}
}
示例3: UpdateHandler
import org.apache.solr.core.PluginInfo; //导入方法依赖的package包/类
public UpdateHandler(SolrCore core, UpdateLog updateLog) {
this.core=core;
idField = core.getLatestSchema().getUniqueKeyField();
idFieldType = idField!=null ? idField.getType() : null;
parseEventListeners();
PluginInfo ulogPluginInfo = core.getSolrConfig().getPluginInfo(UpdateLog.class.getName());
if (updateLog == null && ulogPluginInfo != null && ulogPluginInfo.isEnabled()) {
String dataDir = (String)ulogPluginInfo.initArgs.get("dir");
String ulogDir = core.getCoreDescriptor().getUlogDir();
if (ulogDir != null) {
dataDir = ulogDir;
}
if (dataDir == null || dataDir.length()==0) {
dataDir = core.getDataDir();
}
if (dataDir != null && dataDir.startsWith("hdfs:/")) {
DirectoryFactory dirFactory = core.getDirectoryFactory();
if (dirFactory instanceof HdfsDirectoryFactory) {
ulog = new HdfsUpdateLog(((HdfsDirectoryFactory)dirFactory).getConfDir());
} else {
ulog = new HdfsUpdateLog();
}
} else {
ulog = new UpdateLog();
}
if (!core.isReloaded() && !core.getDirectoryFactory().isPersistent()) {
ulog.clearLog(core, ulogPluginInfo);
}
ulog.init(ulogPluginInfo);
ulog.init(this, core);
} else {
ulog = updateLog;
}
// ulog.init() when reusing an existing log is deferred (currently at the end of the DUH2 constructor
}