Examples of ProcessMonitor


Examples of org.exist.storage.ProcessMonitor

        builder.startDocument();
        builder.startElement( new QName( "jobs", NAMESPACE_URI, PREFIX ), null );

        final BrokerPool brokerPool = context.getBroker().getBrokerPool();
    final ProcessMonitor monitor = brokerPool.getProcessMonitor();
        final ProcessMonitor.JobInfo[] jobs = monitor.runningJobs();
        for (int i = 0; i < jobs.length; i++) {
            final Thread process = jobs[i].getThread();
      final Date startDate = new Date(jobs[i].getStartTime());
            builder.startElement( new QName( "job", NAMESPACE_URI, PREFIX ), null);
            builder.addAttribute( new QName("id", null, null), process.getName());
View Full Code Here

Examples of org.exist.storage.ProcessMonitor

    final XmldbURI src = urls[0];
    final CompiledXQuery compiledQuery = getScript(isBefore, broker, transaction, src);
   
    if (compiledQuery == null) {return;}
   
    ProcessMonitor pm = null;
   
    final XQueryContext context = compiledQuery.getContext();
        //execute the XQuery
        try {
         
        final UserDefinedFunction function = context.resolveFunction(functionName, urls.length);
        if (function != null) {
          final List<Expression> args = new ArrayList<Expression>(urls.length);
          for (int i = 0; i < urls.length; i++)
            args.add(new LiteralValue(context, new AnyURIValue(urls[i])));
         
          pm = broker.getBrokerPool().getProcessMonitor();
         
              context.getProfiler().traceQueryStart();
              pm.queryStarted(context.getWatchDog());
             
              final FunctionCall call = new FunctionCall(context, function);
              call.setArguments(args);
              call.analyze(new AnalyzeContextInfo());
          call.eval(NodeSet.EMPTY_SET);
        }
        } catch(final XPathException e) {
        TriggerStatePerThread.setTriggerRunningState(TriggerStatePerThread.NO_TRIGGER_RUNNING, this, null);
        TriggerStatePerThread.setTransaction(null);
          throw new TriggerException(PEPARE_EXCEIPTION_MESSAGE, e);
        } finally {
          if (pm != null) {
            context.getProfiler().traceQueryEnd(context);
            pm.queryCompleted(context.getWatchDog());
          }
        compiledQuery.reset();
        context.reset();
        }
View Full Code Here

Examples of org.sonar.runner.api.ProcessMonitor

        };
        SonarRunnerProccess sonarRunnerProccess = new SonarRunnerProccess(getServerUrl(), getProjectContext().getProject());
        sonarRunnerProccess.setAnalysisMode(SonarRunnerProccess.AnalysisMode.valueOf(NbPreferences.forModule(SonarQubeOptionsPanel.class).get("runner.analysisMode", "Preview").toUpperCase()));
        sonarRunnerProccess.setOutConsumer(out);
        sonarRunnerProccess.setErrConsumer(err);
        return sonarRunnerProccess.executeRunner(getUserCredentials(), new ProcessMonitor() {

            @Override
            public boolean stop() {
                return stopped;
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.