Package com.gentics.cr.monitoring

Examples of com.gentics.cr.monitoring.UseCase.stop()


          requestID.append('?');
          requestID.append(request.getQueryString());
        }
        log.info("Executiontime for " + requestID + ":" + (endtime - starttime));
      }
      uc.stop();
    }
  }

  public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    doServiceSafe(request, response);
View Full Code Here


    response.getOutputStream().flush();
    response.getOutputStream().close();
    // endtime
    long e = new Date().getTime();
    this.log.info("Executiontime for " + request.getQueryString() + ":" + (e - s));
    uc.stop();
  }

  public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    doService(request, response);
  }
View Full Code Here

      } catch (DatasourceException e) {
        e.printStackTrace();
        throw new CRException("DatasourceException", e.getMessage());
      } finally {
        CRDatabaseFactory.releaseDatasource(ds);
        getObjectCase.stop();
      }
    }
    return collection;
  }
View Full Code Here

    try {
      UseCase getResultFastCase = MonitorFactory.startUseCase("CRRequestProcessor.getResult(" + config.getName()
          + ")#fastResult");
      checkCacheResult = toResolvableCollection(ds.getResult(dsFilter, new String[] {}, first, last, sorting));
      getResultFastCase.stop();

      UseCase getResultCacheCase = MonitorFactory.startUseCase("CRRequestProcessor.getResult(" + config.getName()
          + ")#cache");
      cachedResult = getCachedResult(cacheKey);
      getResultCacheCase.stop();
View Full Code Here

      getResultFastCase.stop();

      UseCase getResultCacheCase = MonitorFactory.startUseCase("CRRequestProcessor.getResult(" + config.getName()
          + ")#cache");
      cachedResult = getCachedResult(cacheKey);
      getResultCacheCase.stop();

      boolean up2date = compare(cachedResult, checkCacheResult);

      if (up2date) {
        collection = cachedResult;
View Full Code Here

        UseCase getResultUncachedCase = MonitorFactory.startUseCase("CRRequestProcessor.getResult("
            + config.getName() + ")#uncached");
        result = ds.getResult(dsFilter, prefillAttributes, first, last, sorting);
        collection = toResolvableCollection(result);
        saveResult(cacheKey, collection);
        getResultUncachedCase.stop();
      }
    } catch (DatasourceException e) {
      logger.error("Cannot get the result from the Datasource.", e);
    }
    getResultCase.stop();
View Full Code Here

      }
      int rightUpdatetime = 0;
      for (Resolvable rightResolvable : right) {
        rightUpdatetime = checkUpdatetime(rightResolvable, rightUpdatetime);
      }
      getResultVerifyCase.stop();
      if (rightUpdatetime != leftUpdatetime) {
        return false;
      }
    }
    return true;
View Full Code Here

  public void processBeanWithMonitoring(CRResolvableBean bean) throws CRException {
    UseCase pcase = MonitorFactory.startUseCase("Transformer:" + this.getClass());
    try {
      processBean(bean);
    } finally {
      pcase.stop();
    }
  }

  /**
   * Processes the specified bean.
View Full Code Here

  public void processBeanWithMonitoring(CRResolvableBean bean, IndexWriter writer) throws CRException {
    UseCase pcase = MonitorFactory.startUseCase("Transformer:" + this.getClass());
    try {
      processBean(bean, writer);
    } finally {
      pcase.stop();
    }
  }

}
View Full Code Here

            log.debug("Executing optimize command.");
            UseCase uc = MonitorFactory.startUseCase("optimize(" + crid + ")");
            try {
              indexWriter.optimize();
            } finally {
              uc.stop();
            }
          } else if (maxSegmentsString != null) {
            log.debug("Executing optimize command with max" + " segments: " + maxSegmentsString);
            int maxs = Integer.parseInt(maxSegmentsString);
            UseCase uc = MonitorFactory.startUseCase("optimize(" + crid + ")");
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.