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


Java RollbackUpdateCommand类代码示例

本文整理汇总了Java中org.apache.solr.update.RollbackUpdateCommand的典型用法代码示例。如果您正苦于以下问题:Java RollbackUpdateCommand类的具体用法?Java RollbackUpdateCommand怎么用?Java RollbackUpdateCommand使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: processRollback

import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
/**
 * @since Solr 1.4
 */
@Override
public void processRollback( RollbackUpdateCommand cmd ) throws IOException {
  if (logDebug) { log.debug("PRE_UPDATE " + cmd.toString() + " " + req); }
  if (next != null) next.processRollback(cmd);

  toLog.add("rollback", "");
}
 
开发者ID:europeana,项目名称:search,代码行数:11,代码来源:LogUpdateProcessorFactory.java

示例2: rollback

import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
@Override
public void rollback() throws IOException
{
    commitAndRollbackLock.writeLock().lock();
    try
    {
        activeTrackerThreadsLock.writeLock().lock();
        try
        {
            activeTrackerThreads.clear();
            
            SolrQueryRequest request = null;
            UpdateRequestProcessor processor = null;
            try
            {
                request = getLocalSolrQueryRequest();
                processor = this.core.getUpdateProcessingChain(null).createProcessor(request, new SolrQueryResponse());
                processor.processRollback(new RollbackUpdateCommand(request));
            }
            finally
            {
                if(processor != null) {processor.finish();}
                if(request != null) {request.close();}
            }
        }
        finally
        {
            activeTrackerThreadsLock.writeLock().unlock();
        }
       
    }
    finally
    {
        commitAndRollbackLock.writeLock().unlock();
    }
    
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:38,代码来源:SolrInformationServer.java

示例3: verifyAuthorized

import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
private void verifyAuthorized(String collection, String user) throws Exception {
  SolrQueryRequestBase req = new SolrQueryRequestBase(core, new MapSolrParams(new HashMap())) {};
  getProcessor(collection, user).processAdd(new AddUpdateCommand(req));
  getProcessor(collection, user).processDelete(new DeleteUpdateCommand(req));
  DeleteUpdateCommand deleteByQueryCommand = new DeleteUpdateCommand(req);
  deleteByQueryCommand.setQuery("*:*");
  getProcessor(collection, user).processDelete(deleteByQueryCommand);
  getProcessor(collection, user).processMergeIndexes(new MergeIndexesCommand(null, req));
  getProcessor(collection, user).processCommit(new CommitUpdateCommand(req, false));
  getProcessor(collection, user).processRollback(new RollbackUpdateCommand(req));
  getProcessor(collection, user).finish();
}
 
开发者ID:apache,项目名称:incubator-sentry,代码行数:13,代码来源:UpdateIndexAuthorizationProcessorTest.java

示例4: rollback

import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
public void rollback(final RollbackUpdateCommand cmd) throws IOException {
    if (position < filters.length) {
        final UpdateHandlerFilter filter = filters[position];
        position++;
        filter.rollback(cmd, this);
    } else {
        updateHandler.doRollback(cmd);
    }
}
 
开发者ID:codelibs,项目名称:fess-solr-plugin,代码行数:10,代码来源:UpdateHandlerFilterChain.java

示例5: processRollback

import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
@Override
public void processRollback(RollbackUpdateCommand cmd) throws IOException
{
  rollbackCommands.add( cmd );
}
 
开发者ID:europeana,项目名称:search,代码行数:6,代码来源:BufferingRequestProcessor.java

示例6: processRollback

import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
@Override
public void processRollback(RollbackUpdateCommand cmd) throws IOException {
  rollbackCalled = true;
  super.processRollback(cmd);
}
 
开发者ID:europeana,项目名称:search,代码行数:6,代码来源:AbstractDataImportHandlerTestCase.java

示例7: processRollback

import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
/**
 * @since Solr 1.4
 */
public void processRollback(RollbackUpdateCommand cmd) throws IOException
{
  if (next != null) next.processRollback(cmd);
}
 
开发者ID:europeana,项目名称:search,代码行数:8,代码来源:UpdateRequestProcessor.java

示例8: parseRollback

import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
RollbackUpdateCommand parseRollback() throws IOException {
  assertNextEvent( JSONParser.OBJECT_START );
  assertNextEvent( JSONParser.OBJECT_END );
  return new RollbackUpdateCommand(req);
}
 
开发者ID:europeana,项目名称:search,代码行数:6,代码来源:JsonLoader.java

示例9: processRollback

import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
@Override
public void processRollback(RollbackUpdateCommand cmd) throws IOException {
  record(cmd);
  super.processRollback(cmd);
}
 
开发者ID:europeana,项目名称:search,代码行数:6,代码来源:RecordingUpdateProcessorFactory.java

示例10: rollback

import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
/**
 * @since Solr 1.4
 */
public void rollback(RollbackUpdateCommand cmd) throws IOException
{

    rollbackCommands.incrementAndGet();

    boolean error = true;
    iwCommit.lock();
    try
    {
        log.info("start " + cmd);

        rollbackWriter();

        // callPostRollbackCallbacks();

        // reset commit tracking
        tracker.didRollback();

        log.info("end_rollback");

        addedLeaves = new ConcurrentHashMap<Long, Long>();
        addedAux = new ConcurrentHashMap<Long, Long>();
        addedAcl = new ConcurrentHashMap<Long, Long>();
        updatedLeaves = new ConcurrentHashMap<Long, Long>();
        updatedAux = new ConcurrentHashMap<Long, Long>();
        updatedAcl = new ConcurrentHashMap<Long, Long>();
        deletedLeaves = new ConcurrentHashMap<Long, Long>();
        deletedAux = new ConcurrentHashMap<Long, Long>();
        deletedAcl = new ConcurrentHashMap<Long, Long>();
    
        deleteAll = new AtomicBoolean(false);
        checkCache = new AtomicBoolean(false);
        
        addedTx = new ConcurrentHashMap<Long, Long>();
        deletedTx = new ConcurrentHashMap<Long, Long>();
        updatedTx = new ConcurrentHashMap<Long, Long>();
        
        addedAclTx = new ConcurrentHashMap<Long, Long>();
        deletedAclTx = new ConcurrentHashMap<Long, Long>();
        updatedAclTx = new ConcurrentHashMap<Long, Long>();
        
        error = false;
    }
    finally
    {
        iwCommit.unlock();
        addCommandsCumulative.set(addCommandsCumulative.get() - addCommands.getAndSet(0));
        deleteByIdCommandsCumulative.set(deleteByIdCommandsCumulative.get() - deleteByIdCommands.getAndSet(0));
        deleteByQueryCommandsCumulative.set(deleteByQueryCommandsCumulative.get() - deleteByQueryCommands.getAndSet(0));
        numErrors.set(error ? 1 : 0);
        
        
    }
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:58,代码来源:AlfrescoUpdateHandler.java

示例11: rollback

import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
@Override
public void rollback() throws IOException
{
    this.core.getUpdateHandler().rollback(new RollbackUpdateCommand());
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:6,代码来源:LegacySolrInformationServer.java

示例12: processRollback

import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
@Override
public void processRollback(RollbackUpdateCommand cmd) throws IOException
{
  authorizeCollectionAction(cmd.name());
  super.processRollback(cmd);
}
 
开发者ID:apache,项目名称:incubator-sentry,代码行数:7,代码来源:UpdateIndexAuthorizationProcessor.java

示例13: rollback

import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
@Override
public void rollback(final RollbackUpdateCommand cmd) throws IOException {
    final UpdateHandlerFilterChain chain = new UpdateHandlerFilterChain(
            this, filters);
    chain.rollback(cmd);
}
 
开发者ID:codelibs,项目名称:fess-solr-plugin,代码行数:7,代码来源:FessUpdateHandler.java

示例14: doRollback

import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
protected void doRollback(final RollbackUpdateCommand cmd)
        throws IOException {
    super.rollback(cmd);
}
 
开发者ID:codelibs,项目名称:fess-solr-plugin,代码行数:5,代码来源:FessUpdateHandler.java

示例15: rollback

import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
public void rollback(final RollbackUpdateCommand cmd,
        final UpdateHandlerFilterChain chain) throws IOException {
    chain.rollback(cmd);
}
 
开发者ID:codelibs,项目名称:fess-solr-plugin,代码行数:5,代码来源:UpdateHandlerFilter.java


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