@Test public void testStartAsyncQueryEntry() { assertThat( threadContext.startAsyncQueryEntry(null, "text", queryMessageSupplier, timerName)) .isEqualTo(NopTransactionService.ASYNC_QUERY_ENTRY); assertThat( threadContext.startAsyncQueryEntry("type", null, queryMessageSupplier, timerName)) .isEqualTo(NopTransactionService.ASYNC_QUERY_ENTRY); assertThat(threadContext.startAsyncQueryEntry("type", "text", null, timerName)) .isEqualTo(NopTransactionService.ASYNC_QUERY_ENTRY); assertThat(threadContext.startAsyncQueryEntry("type", "text", queryMessageSupplier, null)) .isEqualTo(NopTransactionService.ASYNC_QUERY_ENTRY); assertThat( threadContext.startAsyncQueryEntry("type", "text", queryMessageSupplier, timerName) .getClass().getName()).endsWith("$DummyTraceEntryOrQuery"); }
private TraceEntryImpl startAsyncQueryEntry(long startTick, QueryMessageSupplier queryMessageSupplier, TimerImpl syncTimer, AsyncTimerImpl asyncTimer, @Nullable QueryData queryData, long queryExecutionCount) { TraceEntryImpl entry = traceEntryComponent.pushEntry(startTick, queryMessageSupplier, syncTimer, asyncTimer, queryData, queryExecutionCount); transaction.memoryBarrierReadWrite(); return entry; }
ThreadContextImpl implements ThreadContextPlus { private TraceEntryImpl startAsyncQueryEntry(long startTick, QueryMessageSupplier queryMessageSupplier, TimerImpl syncTimer, AsyncTimerImpl asyncTimer, @Nullable QueryData queryData, long queryExecutionCount) { TraceEntryImpl entry = traceEntryComponent.pushEntry(startTick, queryMessageSupplier, syncTimer, asyncTimer, queryData, queryExecutionCount); transaction.memoryBarrierReadWrite(); return entry; } }
ThreadContextImpl implements ThreadContextPlus { private TraceEntryImpl startAsyncQueryEntry(long startTick, QueryMessageSupplier queryMessageSupplier, TimerImpl syncTimer, AsyncTimerImpl asyncTimer, @Nullable QueryData queryData, long queryExecutionCount) { TraceEntryImpl entry = traceEntryComponent.pushEntry(startTick, queryMessageSupplier, syncTimer, asyncTimer, queryData, queryExecutionCount); transaction.memoryBarrierReadWrite(); return entry; } ThreadContextImpl(Transaction transaction, @Nullable TraceEntryImpl parentTraceEntry,
            @Nullable TraceEntryImpl parentThreadContextPriorEntry, MessageSupplier messageSupplier,
            TimerName rootTimerName, long startTick, boolean captureThreadStats,
            int maxQueryAggregates, int maxServiceCallAggregates,
            @Nullable ThreadAllocatedBytes threadAllocatedBytes,
            boolean limitExceededAuxThreadContext, Ticker ticker,
            ThreadContextThreadLocal.Holder threadContextHolder,
            @Nullable ServletRequestInfo servletRequestInfo); }
ThreadContextImpl implements ThreadContextPlus { private TraceEntryImpl startAsyncQueryEntry(long startTick, QueryMessageSupplier queryMessageSupplier, TimerImpl syncTimer, AsyncTimerImpl asyncTimer, @Nullable QueryData queryData, long queryExecutionCount) { TraceEntryImpl entry = traceEntryComponent.pushEntry(startTick, queryMessageSupplier, syncTimer, asyncTimer, queryData, queryExecutionCount); transaction.memoryBarrierReadWrite(); return entry; } ThreadContextImpl(Transaction transaction, @Nullable TraceEntryImpl parentTraceEntry,
            @Nullable TraceEntryImpl parentThreadContextPriorEntry, MessageSupplier messageSupplier,
            TimerName rootTimerName, long startTick, boolean captureThreadStats,
            int maxQueryAggregates, int maxServiceCallAggregates,
            @Nullable ThreadAllocatedBytes threadAllocatedBytes,
            boolean limitExceededAuxThreadContext, Ticker ticker,
            ThreadContextThreadLocal.Holder threadContextHolder,
            @Nullable ServletRequestInfo servletRequestInfo); Transaction getTransaction(); long getThreadId(); boolean isActive(); @Nullable TimerImpl getCurrentTimer(); @Override int getCurrentNestingGroupId(); @Override void setCurrentNestingGroupId(int nestingGroupId); @Override int getCurrentSuppressionKeyId(); @Override void setCurrentSuppressionKeyId(int suppressionKeyId); @Override AuxThreadContext createAuxThreadContext(); @Override boolean isInTransaction(); @Override TraceEntry startTransaction(String transactionType, String transactionName,
            MessageSupplier messageSupplier, TimerName timerName); @Override TraceEntry startTransaction(String transactionType, String transactionName,
            MessageSupplier messageSupplier, TimerName timerName,
            AlreadyInTransactionBehavior alreadyInTransactionBehavior); @Override TraceEntry startTraceEntry(MessageSupplier messageSupplier, TimerName timerName); @Override AsyncTraceEntry startAsyncTraceEntry(MessageSupplier messageSupplier,
            TimerName timerName); @Override QueryEntry startQueryEntry(String queryType, String queryText,
            QueryMessageSupplier queryMessageSupplier, TimerName timerName); @Override QueryEntry startQueryEntry(String queryType, String queryText, long queryExecutionCount,
            QueryMessageSupplier queryMessageSupplier, TimerName timerName); @Override AsyncQueryEntry startAsyncQueryEntry(String queryType, String queryText,
            QueryMessageSupplier queryMessageSupplier, TimerName timerName); @Override TraceEntry startServiceCallEntry(String serviceCallType, String serviceCallText,
            MessageSupplier messageSupplier, TimerName timerName); @Override AsyncTraceEntry startAsyncServiceCallEntry(String serviceCallType,
            String serviceCallText, MessageSupplier messageSupplier, TimerName timerName); @Override Timer startTimer(TimerName timerName); @Override void setTransactionAsync(); @Override void setTransactionAsyncComplete(); @Override void setTransactionOuter(); @Override void setTransactionType(@Nullable String transactionType, int priority); @Override void setTransactionName(@Nullable String transactionName, int priority); @Override void setTransactionUser(@Nullable String user, int priority); @Override void addTransactionAttribute(String name, @Nullable String value); @Override void setTransactionSlowThreshold(long threshold, TimeUnit unit, int priority); @Override void setTransactionError(Throwable t); @Override void setTransactionError(@Nullable String message); @Override void setTransactionError(@Nullable String message, @Nullable Throwable t); @Override void addErrorEntry(Throwable t); @Override void addErrorEntry(@Nullable String message); @Override void addErrorEntry(@Nullable String message, Throwable t); @Override @Nullable ServletRequestInfo getServletRequestInfo(); @Override void setServletRequestInfo(@Nullable ServletRequestInfo servletRequestInfo); @Override @Deprecated @Nullable MessageSupplier getServletMessageSupplier(); @Override @Deprecated void setServletMessageSupplier(@Nullable MessageSupplier messageSupplier); }
ThreadContextImpl implements ThreadContextPlus { private TraceEntryImpl startAsyncQueryEntry(long startTick, QueryMessageSupplier queryMessageSupplier, TimerImpl syncTimer, AsyncTimerImpl asyncTimer, @Nullable QueryData queryData, long queryExecutionCount) { TraceEntryImpl entry = traceEntryComponent.pushEntry(startTick, queryMessageSupplier, syncTimer, asyncTimer, queryData, queryExecutionCount); transaction.memoryBarrierReadWrite(); return entry; } ThreadContextImpl(Transaction transaction, @Nullable TraceEntryImpl parentTraceEntry,
            @Nullable TraceEntryImpl parentThreadContextPriorEntry, MessageSupplier messageSupplier,
            TimerName rootTimerName, long startTick, boolean captureThreadStats,
            int maxQueryAggregates, int maxServiceCallAggregates,
            @Nullable ThreadAllocatedBytes threadAllocatedBytes,
            boolean limitExceededAuxThreadContext, Ticker ticker,
            ThreadContextThreadLocal.Holder threadContextHolder,
            @Nullable ServletRequestInfo servletRequestInfo); Transaction getTransaction(); long getThreadId(); boolean isActive(); @Nullable TimerImpl getCurrentTimer(); @Override int getCurrentNestingGroupId(); @Override void setCurrentNestingGroupId(int nestingGroupId); @Override int getCurrentSuppressionKeyId(); @Override void setCurrentSuppressionKeyId(int suppressionKeyId); @Override AuxThreadContext createAuxThreadContext(); @Override boolean isInTransaction(); @Override TraceEntry startTransaction(String transactionType, String transactionName,
            MessageSupplier messageSupplier, TimerName timerName); @Override TraceEntry startTransaction(String transactionType, String transactionName,
            MessageSupplier messageSupplier, TimerName timerName,
            AlreadyInTransactionBehavior alreadyInTransactionBehavior); @Override TraceEntry startTraceEntry(MessageSupplier messageSupplier, TimerName timerName); @Override AsyncTraceEntry startAsyncTraceEntry(MessageSupplier messageSupplier,
            TimerName timerName); @Override QueryEntry startQueryEntry(String queryType, String queryText,
            QueryMessageSupplier queryMessageSupplier, TimerName timerName); @Override QueryEntry startQueryEntry(String queryType, String queryText, long queryExecutionCount,
            QueryMessageSupplier queryMessageSupplier, TimerName timerName); @Override AsyncQueryEntry startAsyncQueryEntry(String queryType, String queryText,
            QueryMessageSupplier queryMessageSupplier, TimerName timerName); @Override TraceEntry startServiceCallEntry(String serviceCallType, String serviceCallText,
            MessageSupplier messageSupplier, TimerName timerName); @Override AsyncTraceEntry startAsyncServiceCallEntry(String serviceCallType,
            String serviceCallText, MessageSupplier messageSupplier, TimerName timerName); @Override Timer startTimer(TimerName timerName); @Override void setTransactionAsync(); @Override void setTransactionAsyncComplete(); @Override void setTransactionOuter(); @Override void setTransactionType(@Nullable String transactionType, int priority); @Override void setTransactionName(@Nullable String transactionName, int priority); @Override void setTransactionUser(@Nullable String user, int priority); @Override void addTransactionAttribute(String name, @Nullable String value); @Override void setTransactionSlowThreshold(long threshold, TimeUnit unit, int priority); @Override void setTransactionError(Throwable t); @Override void setTransactionError(@Nullable String message); @Override void setTransactionError(@Nullable String message, @Nullable Throwable t); @Override void addErrorEntry(Throwable t); @Override void addErrorEntry(@Nullable String message); @Override void addErrorEntry(@Nullable String message, Throwable t); @Override @Nullable ServletRequestInfo getServletRequestInfo(); @Override void setServletRequestInfo(@Nullable ServletRequestInfo servletRequestInfo); @Override @Deprecated @Nullable MessageSupplier getServletMessageSupplier(); @Override @Deprecated void setServletMessageSupplier(@Nullable MessageSupplier messageSupplier);  }