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


Java SolrCore.getName方法代码示例

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


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

示例1: closeIndexWriter

import org.apache.solr.core.SolrCore; //导入方法依赖的package包/类
@Override
public synchronized void closeIndexWriter(SolrCore core, boolean rollback)
    throws IOException {
  log.info("Closing IndexWriter...");
  String coreName = core.getName();
  synchronized (writerPauseLock) {
    if (closed) {
      throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE, "Already closed");
    }
    
    // we need to wait for the Writer to fall out of use
    // first lets stop it from being lent out
    pauseWriter = true;
    // then lets wait until its out of use
    log.info("Waiting until IndexWriter is unused... core=" + coreName);
    
    while (!writerFree) {
      try {
        writerPauseLock.wait(100);
      } catch (InterruptedException e) {}
      
      if (closed) {
        throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE,
            "SolrCoreState already closed");
      }
    }
    
    if (indexWriter != null) {
      if (!rollback) {
        closeIndexWriter(coreName);
      } else {
        rollbackIndexWriter(coreName);
      }
    }
    
  }
}
 
开发者ID:europeana,项目名称:search,代码行数:38,代码来源:DefaultSolrCoreState.java

示例2: SolrCoreCommitAgent

import org.apache.solr.core.SolrCore; //导入方法依赖的package包/类
public SolrCoreCommitAgent(SolrCore solrCore) {
    super(solrCore.getName() + "/commit", "solr/core/commit");

    this.solrCore = solrCore;
    SolrCore.log.info("Initializing " + this.getClass().getSimpleName() + " for Core '" + this.solrCore + "'.");

    this.solrCore.registerNewSearcherListener(this);
    this.solrCore.getUpdateHandler().registerCommitCallback(this);
    this.solrCore.getUpdateHandler().registerSoftCommitCallback(this);
}
 
开发者ID:Indoqa,项目名称:logspace,代码行数:11,代码来源:SolrCoreCommitAgent.java

示例3: newIndexWriter

import org.apache.solr.core.SolrCore; //导入方法依赖的package包/类
@Override
public synchronized void newIndexWriter(SolrCore core, boolean rollback) throws IOException {
  log.info("Creating new IndexWriter...");
  String coreName = core.getName();
  synchronized (writerPauseLock) {
    if (closed) {
      throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE, "Already closed");
    }
    
    // we need to wait for the Writer to fall out of use
    // first lets stop it from being lent out
    pauseWriter = true;
    // then lets wait until its out of use
    log.info("Waiting until IndexWriter is unused... core=" + coreName);
    
    while (!writerFree) {
      try {
        writerPauseLock.wait(100);
      } catch (InterruptedException e) {}
      
      if (closed) {
        throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE, "SolrCoreState already closed");
      }
    }

    try {
      if (indexWriter != null) {
        if (!rollback) {
          closeIndexWriter(coreName);
        } else {
          rollbackIndexWriter(coreName);
        }
      }
      indexWriter = createMainIndexWriter(core, "DirectUpdateHandler2");
      log.info("New IndexWriter is ready to be used.");
      // we need to null this so it picks up the new writer next get call
      refCntWriter = null;
    } finally {
      
      pauseWriter = false;
      writerPauseLock.notifyAll();
    }
  }
}
 
开发者ID:europeana,项目名称:search,代码行数:45,代码来源:DefaultSolrCoreState.java

示例4: SolrCoreStatisticsAgent

import org.apache.solr.core.SolrCore; //导入方法依赖的package包/类
public SolrCoreStatisticsAgent(SolrCore solrCore) {
    super(solrCore.getName() + "/statistics", "solr/core/statistics");

    this.solrCore = solrCore;
    SolrCore.log.info("Initializing " + this.getClass().getSimpleName() + " for Core '" + this.solrCore + "'.");
}
 
开发者ID:Indoqa,项目名称:logspace,代码行数:7,代码来源:SolrCoreStatisticsAgent.java


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