本文整理汇总了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", "");
}
示例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();
}
}
示例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();
}
示例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);
}
}
示例5: processRollback
import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
@Override
public void processRollback(RollbackUpdateCommand cmd) throws IOException
{
rollbackCommands.add( cmd );
}
示例6: processRollback
import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
@Override
public void processRollback(RollbackUpdateCommand cmd) throws IOException {
rollbackCalled = true;
super.processRollback(cmd);
}
示例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);
}
示例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);
}
示例9: processRollback
import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
@Override
public void processRollback(RollbackUpdateCommand cmd) throws IOException {
record(cmd);
super.processRollback(cmd);
}
示例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);
}
}
示例11: rollback
import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
@Override
public void rollback() throws IOException
{
this.core.getUpdateHandler().rollback(new RollbackUpdateCommand());
}
示例12: processRollback
import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
@Override
public void processRollback(RollbackUpdateCommand cmd) throws IOException
{
authorizeCollectionAction(cmd.name());
super.processRollback(cmd);
}
示例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);
}
示例14: doRollback
import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
protected void doRollback(final RollbackUpdateCommand cmd)
throws IOException {
super.rollback(cmd);
}
示例15: rollback
import org.apache.solr.update.RollbackUpdateCommand; //导入依赖的package包/类
public void rollback(final RollbackUpdateCommand cmd,
final UpdateHandlerFilterChain chain) throws IOException {
chain.rollback(cmd);
}