/*
(non-Javadoc)
@see org.springframework.data.solr.core.SolrOperations#execute(org.springframework.data.solr.core.SolrCallback)
436032
@Override
	public <T> T execute(SolrCallback<T> action) {
		Assert.notNull(action, "SolrCallback must not be null!");

		try {
			SolrClient solrClient = this.getSolrClient();
			return action.doInSolr(solrClient);
		} catch (Exception e) {
			DataAccessException resolved = getExceptionTranslator().translateExceptionIfPossible(
					e instanceof RuntimeException ? (RuntimeException) e : new RuntimeException(e.getMessage(), e));
			throw resolved == null ? new UncategorizedSolrException(e.getMessage(), e) : resolved;
		}
	}
33365
public void execute() {
        try {
            while(true) {
                Event event = null;

                try {
                    event = eventQueue.poll(timeout, unit);
                } catch(InterruptedException e) {
                    throw new InsufficientOperationalNodesException(operation.getSimpleName()
                                                                    + " operation interrupted!", e);
                }

                if(event == null)
                    throw new VoldemortException(operation.getSimpleName()
                                                 + " returned a null event");

                if(event.equals(Event.ERROR)) {
                    if(logger.isTraceEnabled())
                        logger.trace(operation.getSimpleName()
                                     + " request, events complete due to error");

                    break;
                } else if(event.equals(Event.COMPLETED)) {
                    if(logger.isTraceEnabled())
                        logger.trace(operation.getSimpleName() + " request, events complete");

                    break;
                }

                Action action = eventActions.get(event);

                if(action == null)
                    throw new IllegalStateException("action was null for event " + event);

                if(logger.isTraceEnabled())
                    logger.trace(operation.getSimpleName() + " request, action "
                                 + action.getClass().getSimpleName() + " to handle " + event
                                 + " event");

                action.execute(this);
            }
        } finally {
            finished = true;
        }
    }
837316
@Override
    public void execute()
    {
        if ( "pom".equals( project.getPackaging() ) )
        {
            return;
        }

        if ( skip )
        {
            return;
        }
        
        long ts = System.currentTimeMillis();

        Properties projectProperties = project.getProperties();

        restoreProperty( projectProperties, "sbt._scalacOptions" );
        restoreProperty( projectProperties, "sbt._scalacPlugins" );
        restoreProperty( projectProperties, "addScalacArgs" );
        restoreProperty( projectProperties, "analysisCacheFile" );
        restoreProperty( projectProperties, "maven.test.failure.ignore" );

        long te = System.currentTimeMillis();
        getLog().debug( String.format( "Mojo execution time: %d ms", te - ts ) );
    }
970488
@SuppressWarnings("unchecked")
    @Override
    public Boolean execute() {
        User sfsSender = CommandUtil.getSfsUser(sender, api);
        Room sfsRoom = CommandUtil.getSfsRoom(room, extension);
        if(sfsSender == null || sfsRoom == null)
            return Boolean.FALSE;
        message = (message == null) ? "" : message;
        ISFSObject sfsParams = null;
        if(params != null) {
            MessageParamsClass clazz = context.getMessageParamsClass(params.getClass());
            if(clazz != null) 
                sfsParams = new ResponseParamSerializer().object2params(clazz.getUnwrapper(), params);
        }
        if(sfsParams == null) sfsParams = new SFSObject();
        api.sendPublicMessage(sfsRoom, sfsSender, message, sfsParams);
        return Boolean.TRUE;
    }
4577
@Override
    public void execute() throws BuildException {
        if (path == null)
            throw new BuildException("Path isn't defined");

        if (descriptors == null)
            throw new BuildException("Descriptors isn't defined");

        if (descriptors.getData() == null)
            throw new BuildException("No descriptor defined");

        ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
        try {
            if (classpathRef != null || classpath != null) {
                org.apache.tools.ant.types.Path p = new org.apache.tools.ant.types.Path(getProject());

                if (classpathRef != null) {
                    org.apache.tools.ant.types.Reference reference = new org.apache.tools.ant.types.Reference(
                        getProject(), classpathRef);
                    p.setRefid(reference);
                }

                if (classpath != null) {
                    p.append(classpath);
                }

                ClassLoader cl = getProject().createClassLoader(oldCl, p);
                Thread.currentThread().setContextClassLoader(cl);
            }

            final List<Descriptor> data = descriptors.getData();
            for (Descriptor d : data) {
                d.applyNamespaces();
            }

            List<Javadoc> javadoc = null;
            if (javadocs != null) {
                javadoc = javadocs.getData();
            }

            final MetadataParser metadataParser = new MetadataParser();
            metadataParser.parse(path, data, javadoc, verbose);
        } catch (Throwable t) {
            throw new BuildException(t.getMessage(), t);
        } finally {
            Thread.currentThread().setContextClassLoader(oldCl);
        }
    }
995925
@Override
    public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
        final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR));
        ListIterator<PathElement> iterator = address.iterator();
        PathElement element = iterator.next();
        while (!element.getValue().equals(InfinispanSubsystem.SUBSYSTEM_NAME)) {
            element = iterator.next();
        }
        final String cacheContainerName = iterator.next().getValue();
        final String cacheName = iterator.next().getValue();
        if (context.isNormalServer()) {
            final ServiceController<?> controller = context.getServiceRegistry(false).getService(CacheServiceName.CACHE.getServiceName(cacheContainerName, cacheName));
            Cache<?, ?> cache = (Cache<?, ?>) controller.getValue();

            ModelNode operationResult;
            try {
                operationResult = invokeCommand(cache, operation, context);
            } catch (Exception e) {
                throw new OperationFailedException(MESSAGES.failedToInvokeOperation(e.getLocalizedMessage()), e);
            }
            if (operationResult != null) {
                context.getResult().set(operationResult);
            }
        }
    }
12593
@Override
	public final SolrQuery doConstructSolrQuery(SolrDataQuery query, @Nullable Class<?> domainType) {

		Assert.notNull(query, "Cannot construct solrQuery from null value.");
		Assert.notNull(query.getCriteria(), "Query has to have a criteria.");

		SolrQuery solrQuery = new SolrQuery();
		solrQuery.setParam(CommonParams.Q, getQueryString(query, domainType));

		if (query instanceof Query) {
			processQueryOptions(solrQuery, (Query) query, domainType);
		}

		if (query instanceof FacetQuery) {
			processFacetOptions(solrQuery, (FacetQuery) query, domainType);
		}

		if (query instanceof HighlightQuery) {
			processHighlightOptions(solrQuery, (HighlightQuery) query, domainType);
		}

		return solrQuery;
	}
27552
public void execute() {
		Map<Partition, List<Node>> map = getNodesByPartition();
		for (Partition partition : map.keySet()) {
			List<Node> nodes = map.get(partition);
			partition.execute(nodes);
		}
	}
244568
public DomainQueryResult execute() {
		DomainQueryResult ret = new DomainQueryResult(this);
		Object so = this.queryExecutor.getMappingInfo().getInternalDomainAccess().getSyncObject();
		if (so != null) {
			synchronized (so) {
				this.queryExecutor.execute();
			}
		} else
			this.queryExecutor.execute();
		return ret;
	}
785610
@Override
    public List executeQuery(Class clazz, List<String> relationalField, boolean isNative, String cqlQuery) {
        ResultSet rSet = (ResultSet) this.execute(cqlQuery, null);
        if (clazz == null) {
		// XXX
            if (isNative)
                return iterateAndReturnNative(rSet);
            return iterateAndReturn(rSet);
        }
        EntityMetadata metadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, clazz);
        return iterateAndReturn(rSet, metadata);
    }
212210
public void execute() throws XDocletException
    {
        if (getJspversion().equals(JspVersionTypes.VERSION_1_1)) {
            setPublicId(TLD_PUBLICID_1_1);
            setSystemId(TLD_SYSTEMID_1_1);
            setDtdURL(getClass().getResource(TLD_DTD_FILE_NAME_1_1));
        }
        else {
            setPublicId(TLD_PUBLICID_1_2);
            setSystemId(TLD_SYSTEMID_1_2);
            setDtdURL(getClass().getResource(TLD_DTD_FILE_NAME_1_2));
        }

        startProcess();
    }
847063
private Response execute(final Builder theRequestBuilder, final String methodKey)
            throws IOException {
        final JaxRsRequest theRequest = theRequestBuilder.build();
        final BaseMethodBinding<?> method = getBinding(theRequest.getRestOperationType(), methodKey);
        try {
            return (Response) method.invokeServer(this, theRequest);
        }
        catch (final Throwable theException) {
            return handleException(theRequest, theException);
        }
    }
1005054
public SolrDocumentList runQuery(String q, List<String> fieldList,
			int results) throws SolrServerException {
		SolrQuery query = new SolrQuery();
		query.setQuery(escapeQuery(q));
		query.setRows(results);
		query.setFields(fieldList.toArray(new String[1]));
		QueryResponse rsp = server.query(query, METHOD.POST);
		return rsp.getResults();
	}
828714
public void execute() {
        try {
            new JdbcTemplate(dataSource).execute(readResourceContent(SCHEMA_FILE)); // TODO: sql independence
        } catch (IOException e) {
            throw new RuntimeException("Could not create schema for EDBI Index", e);
        }
    }
202374
@Override
    public void execute() {
        if ((str == null || str.isEmpty()) && !FindContext.isAvailable()) {
            try {
                str = editor.readLine("Find previous:");
                editor.findPrevious(str);
                FindContext.setLastSearch(str);
            } catch (IOException e) {
                //noop
            }
        } else if (FindContext.isAvailable()) {
            editor.findPrevious(FindContext.getLastSearch());
        } else {
            editor.findPrevious(str);
            FindContext.setLastSearch(str);
        }
    }
865479
@Override
	public void execute() {
		if (target instanceof WComponentGroup<?>) {
			for (WComponent component : ((WComponentGroup<WComponent>) target).getComponents()) {
				if (component instanceof SubordinateTarget) {
					applyAction((SubordinateTarget) component, value);
				}
			}
		} else {
			// Leaf.
			applyAction(target, value);
		}

	}
170818
private void executeQuery(ServerCommit commit, ServerSessionContext session, CompletableFuture<Result> future, ThreadContext context) {
    if (!log.isOpen()) {
      context.executor().execute(() -> future.completeExceptionally(new IllegalStateException("log closed")));
      return;
    }

    // If the session is already in an inactive state, complete the future exceptionally.
    if (!session.state().active()) {
      context.executor().execute(() -> future.completeExceptionally(new UnknownSessionException("inactive session: " + session.id())));
      return;
    }

    long index = commit.index();
    long eventIndex = session.getEventIndex();

    // Update the state machine context with the query entry's index. We set a null consistency
    // level to indicate that events cannot be published in this context. Publishing events in
    // response to state machine queries is non-deterministic as queries are not replicated.
    executor.init(index, commit.time(), ServerStateMachineContext.Type.QUERY);

    try {
      Object result = executor.executeOperation(commit);
      context.executor().execute(() -> future.complete(new Result(index, eventIndex, result)));
    } catch (Exception e) {
      context.executor().execute(() -> future.complete(new Result(index, eventIndex, e)));
    }
  }