/** * Executes the query on the indexing tree. * * @param indexQuery * Index query to execute. * @param useForkJoin * true, if forkJoinPool should be used * @return Result list. */ protected List<E> executeQuery(IIndexQuery indexQuery, boolean useForkJoin) { return this.executeQuery(indexQuery, null, null, -1, useForkJoin); }
/** * Executes the query on the indexing tree. Results can be sorted by comparator. * * @param indexQuery * Index query to execute. * @param comparator * If supplied the final result list will be sorted by this comparator. * @param useForkJoin * true, if forkJoinPool should be used * @return Result list. */ protected List<E> executeQuery(IIndexQuery indexQuery, Comparator<? super E> comparator, boolean useForkJoin) { return this.executeQuery(indexQuery, null, comparator, -1, useForkJoin); }
/** * Executes the query on the indexing tree. Furthermore the result list can be limited. * * @param indexQuery * Index query to execute. * @param limit * Limit the number of results by given number. Value <code>-1</code> means no limit. * @param useForkJoin * true, if forkJoinPool should be used * @return Result list. */ protected List<E> executeQuery(IIndexQuery indexQuery, int limit, boolean useForkJoin) { return this.executeQuery(indexQuery, null, null, limit, useForkJoin); }
/** * Executes the query on the indexing tree. If the {@link IAggregator} is not <code>null</code> * then the results will be aggregated based on the given {@link IAggregator}. * * @param indexQuery * Index query to execute. * @param aggregator * {@link IAggregator}. Pass <code>null</code> if no aggregation is needed. * @param useForkJoin * true, if forkJoinPool should be used * @return Result list. */ protected List<E> executeQuery(IIndexQuery indexQuery, IAggregator<E> aggregator, boolean useForkJoin) { return this.executeQuery(indexQuery, aggregator, null, -1, useForkJoin); }
/** * Executes the query on the indexing tree. If the {@link IAggregator} is not <code>null</code> * then the results will be aggregated based on the given {@link IAggregator}. * * @param indexQuery * Index query to execute. * @param aggregator * {@link IAggregator}. Pass <code>null</code> if no aggregation is needed. * @param comparator * If supplied the final result list will be sorted by this comparator. * @param useForkJoin * true, if forkJoinPool should be used * @return Result list. */ protected List<E> executeQuery(IIndexQuery indexQuery, IAggregator<E> aggregator, Comparator<? super E> comparator, boolean useForkJoin) { return this.executeQuery(indexQuery, aggregator, comparator, -1, useForkJoin); }
/** * {@inheritDoc} */ @Override public List<InvocationSequenceData> getInvocationSequenceDetail(long platformId, long methodId, int limit, Date fromDate, Date toDate, Comparator<? super InvocationSequenceData> comparator) { IIndexQuery query = invocationDataQueryFactory.getInvocationSequences(platformId, methodId, fromDate, toDate); if (null != comparator) { return super.executeQuery(query, comparator, limit, false); } else { return super.executeQuery(query, DefaultDataComparatorEnum.TIMESTAMP, limit, false); } }
/** * {@inheritDoc} */ @Override public List<ExceptionSensorData> getUngroupedExceptionOverview(ExceptionSensorData template, int limit, Date fromDate, Date toDate, Comparator<? super ExceptionSensorData> comparator) { IIndexQuery query = exceptionSensorDataQueryFactory.getUngroupedExceptionOverviewQuery(template, limit, fromDate, toDate); if (null != comparator) { return super.executeQuery(query, comparator, limit, true); } else { return super.executeQuery(query, DefaultDataComparatorEnum.TIMESTAMP, limit, true); } }
/** * {@inheritDoc} */ @Override public List<SqlStatementData> getParameterAggregatedSqlStatements(SqlStatementData sqlStatementData, Date fromDate, Date toDate) { IIndexQuery query = sqlDataQueryFactory.getAggregatedSqlStatementsQuery(sqlStatementData, fromDate, toDate); return super.executeQuery(query, Aggregators.SQL_STATEMENT_DATA_PARAMETER_AGGREGATOR, true); }
/** * {@inheritDoc} */ @Override public List<SqlStatementData> getAggregatedSqlStatements(SqlStatementData sqlStatementData, Date fromDate, Date toDate) { IIndexQuery query = sqlDataQueryFactory.getAggregatedSqlStatementsQuery(sqlStatementData, fromDate, toDate); return super.executeQuery(query, Aggregators.SQL_STATEMENT_DATA_AGGREGATOR, true); }
/** * {@inheritDoc} */ @Override public Collection<InvocationSequenceData> getInvocationSequenceDetail(long traceId) { IIndexQuery query = invocationDataQueryFactory.getInvocationSequences(traceId); return super.executeQuery(query, true); }
/** * {@inheritDoc} */ @Override public List<TimerData> getAggregatedTimerData(TimerData timerData, Date fromDate, Date toDate) { IIndexQuery query = timerDataQueryFactory.getAggregatedTimerDataQuery(timerData, fromDate, toDate); return super.executeQuery(query, Aggregators.TIMER_DATA_AGGREGATOR, true); } }
/** * {@inheritDoc} */ @Override public List<ExceptionSensorData> getExceptionTree(ExceptionSensorData template) { IIndexQuery query = exceptionSensorDataQueryFactory.getExceptionTreeQuery(template); List<ExceptionSensorData> results = super.executeQuery(query, false); Collections.reverse(results); return results; }
/** * {@inheritDoc} */ @Override public List<ExceptionSensorData> getStackTraceMessagesForThrowableType(ExceptionSensorData template) { IIndexQuery query = exceptionSensorDataQueryFactory.getStackTraceMessagesForThrowableTypeQuery(template); return super.executeQuery(query, Aggregators.DISTINCT_STACK_TRACES_AGGREGATOR, true); }
/** * {@inheritDoc} */ @Override public List<AggregatedExceptionSensorData> getDataForGroupedExceptionOverview(ExceptionSensorData template, Date fromDate, Date toDate) { IIndexQuery query = exceptionSensorDataQueryFactory.getDataForGroupedExceptionOverviewQuery(template, fromDate, toDate); List<ExceptionSensorData> results = super.executeQuery(query, Aggregators.GROUP_EXCEPTION_OVERVIEW_AGGREGATOR, true); List<AggregatedExceptionSensorData> aggResults = new ArrayList<>(); for (ExceptionSensorData exData : results) { if (exData instanceof AggregatedExceptionSensorData) { aggResults.add((AggregatedExceptionSensorData) exData); } } return aggResults; }
/** * {@inheritDoc} */ @Override public List<InvocationSequenceData> getInvocationSequenceOverview(long platformId, Date fromDate, Date toDate, long minId, int limit, int businessTrxId, int applicationId, // NOCHK Collection<Long> invocationIdCollection, Comparator<? super InvocationSequenceData> comparator) { IIndexQuery query = invocationDataQueryFactory.getInvocationSequences(platformId, fromDate, toDate, minId, businessTrxId, applicationId, invocationIdCollection); List<InvocationSequenceData> resultWithChildren; if (null != comparator) { resultWithChildren = super.executeQuery(query, comparator, limit, false); } else { resultWithChildren = super.executeQuery(query, DefaultDataComparatorEnum.TIMESTAMP, limit, false); } List<InvocationSequenceData> realResults = new ArrayList<InvocationSequenceData>(resultWithChildren.size()); for (InvocationSequenceData invocationSequenceData : resultWithChildren) { realResults.add(invocationSequenceData.getClonedInvocationSequence()); } return realResults; }
/** * {@inheritDoc} */ @Override public List<InvocationSequenceData> getInvocationSequenceOverview(long platformId, long methodId, int limit, Date fromDate, Date toDate, Comparator<? super InvocationSequenceData> comparator) { IIndexQuery query = invocationDataQueryFactory.getInvocationSequences(platformId, methodId, fromDate, toDate); List<InvocationSequenceData> resultWithChildren; if (null != comparator) { resultWithChildren = super.executeQuery(query, comparator, limit, false); } else { resultWithChildren = super.executeQuery(query, DefaultDataComparatorEnum.TIMESTAMP, limit, false); } List<InvocationSequenceData> realResults = new ArrayList<>(resultWithChildren.size()); for (InvocationSequenceData invocationSequenceData : resultWithChildren) { realResults.add(invocationSequenceData.getClonedInvocationSequence()); } return realResults; }
/** * {@inheritDoc} */ @Override public List<HttpTimerData> getAggregatedHttpTimerData(HttpTimerData httpData, boolean includeRequestMethod) { IIndexQuery query = httpDataQueryFactory.getFindAllHttpTimersQuery(httpData, null, null); return super.executeQuery(query, new HttpTimerDataAggregator(true, includeRequestMethod), false); }
/** * {@inheritDoc} */ @Override public List<HttpTimerData> getTaggedAggregatedHttpTimerData(HttpTimerData httpData, boolean includeRequestMethod) { IIndexQuery query = httpDataQueryFactory.getFindAllTaggedHttpTimersQuery(httpData, null, null); return super.executeQuery(query, new HttpTimerDataAggregator(false, includeRequestMethod), false); }
/** * {@inheritDoc} */ @Override public List<HttpTimerData> getAggregatedHttpTimerData(HttpTimerData httpData, boolean includeRequestMethod, Date fromDate, Date toDate) { IIndexQuery query = httpDataQueryFactory.getFindAllHttpTimersQuery(httpData, fromDate, toDate); return super.executeQuery(query, new HttpTimerDataAggregator(true, includeRequestMethod), false); }
/** * {@inheritDoc} */ @Override public List<HttpTimerData> getTaggedAggregatedHttpTimerData(HttpTimerData httpData, boolean includeRequestMethod, Date fromDate, Date toDate) { IIndexQuery query = httpDataQueryFactory.getFindAllTaggedHttpTimersQuery(httpData, fromDate, toDate); return super.executeQuery(query, new HttpTimerDataAggregator(false, includeRequestMethod), false); }