public class TransactionActivity
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
NOT_REPORTED |
| Constructor and Description |
|---|
TransactionActivity()
The public constructor may be used only for test purposes.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTracer(Tracer tracer) |
Tracer |
addTracerToStack(Tracer tracer)
Copies a tracer to the call stack.
|
boolean |
canCreateTransactionSegment()
Return true if the tracer being created is allowed to create a new segment.
|
boolean |
checkTracerStart()
Optimized tracer start call.
|
static void |
clear()
Clear the TransactionActivity from the thread local that holds it.
|
static TransactionActivity |
create(Transaction transaction,
int id) |
static TransactionActivity |
createWithoutHolder(Transaction transaction,
int id,
java.lang.String asyncContext)
Creates a TransactionActivity.
|
void |
finishFlyweightTracer(com.newrelic.agent.bridge.TracedMethod parent,
long startInNanos,
long finishInNanos,
java.lang.String className,
java.lang.String methodName,
java.lang.String methodDesc,
java.lang.String metricName,
java.lang.String[] rollupMetricNames) |
static TransactionActivity |
get() |
java.lang.String |
getAsyncContext() |
Tracer |
getLastTracer()
Get the last tracer on the call stack, or null if the call stack is empty.
|
Tracer |
getRootTracer() |
Segment |
getSegment() |
long |
getThreadId() |
long |
getTotalCpuTime()
Returns the total cpu time in nanoseconds;
|
java.util.List<Tracer> |
getTracers()
Return the current state of the tracer stack for this activity.
|
Transaction |
getTransaction() |
TransactionCache |
getTransactionCache()
Get a cache to store objects for the life of the transaction.
|
TransactionStats |
getTransactionStats() |
int |
hashCode() |
boolean |
isFinished() |
boolean |
isIgnored() |
boolean |
isLeaf()
Return true if the tracer at the top of tracer stack is a flyweight tracer (leaf by default) or a leaf tracer.
|
boolean |
isNotInThreadLocal() |
boolean |
isStarted() |
boolean |
isTracerStartLocked()
Test the tracer start lock.
|
void |
lockTracerStart()
The tracer start lock is designed to prevent tracers from being created during the creation of another tracer.
|
void |
markAsResponseSender() |
void |
recordCpu() |
static void |
set(TransactionActivity txa)
Jam the argument into the thread local that holds it.
|
void |
setAsyncContext(java.lang.String asyncContext)
set the async context associated with this transaction activity.
|
void |
setSegment(Segment segment) |
void |
setToIgnore() |
void |
setTotalCpuTime(long totalCpuTimeInNanos) |
void |
startAsyncActivity(Transaction transaction,
int activityId,
Tracer parentTracer) |
com.newrelic.agent.bridge.TracedMethod |
startFlyweightTracer() |
void |
tracerFinished(Tracer tracer,
int opcode)
Pop the finished tracer off the call stack.
|
Tracer |
tracerStarted(Tracer tracer)
Adds a tracer to the call stack.
|
void |
unlockTracerStart()
Release the tracer start lock.
|
public static final int NOT_REPORTED
public TransactionActivity()
public static void clear()
public static void set(TransactionActivity txa)
txa - the new value to make currentpublic static TransactionActivity get()
public static TransactionActivity create(Transaction transaction, int id)
public static TransactionActivity createWithoutHolder(Transaction transaction, int id, java.lang.String asyncContext)
transaction - parent transactionid - ID of the activityasyncContext - name of async context; since external async spans multiple threads, this is typically the
thread name that this is running on.public boolean canCreateTransactionSegment()
public void markAsResponseSender()
public long getThreadId()
public java.lang.String getAsyncContext()
public void setAsyncContext(java.lang.String asyncContext)
public TransactionStats getTransactionStats()
public java.util.List<Tracer> getTracers()
public long getTotalCpuTime()
public boolean isNotInThreadLocal()
public void setTotalCpuTime(long totalCpuTimeInNanos)
public void setToIgnore()
public boolean isIgnored()
public Tracer tracerStarted(Tracer tracer)
tracer - public Tracer addTracerToStack(Tracer tracer)
tracer - public void tracerFinished(Tracer tracer, int opcode)
public boolean isStarted()
public boolean isFinished()
public boolean isLeaf()
public void recordCpu()
public void addTracer(Tracer tracer)
public void setSegment(Segment segment)
public Segment getSegment()
public void lockTracerStart()
public void unlockTracerStart()
public boolean isTracerStartLocked()
public boolean checkTracerStart()
public Tracer getLastTracer()
public com.newrelic.agent.bridge.TracedMethod startFlyweightTracer()
public void finishFlyweightTracer(com.newrelic.agent.bridge.TracedMethod parent,
long startInNanos,
long finishInNanos,
java.lang.String className,
java.lang.String methodName,
java.lang.String methodDesc,
java.lang.String metricName,
java.lang.String[] rollupMetricNames)
public void startAsyncActivity(Transaction transaction, int activityId, Tracer parentTracer)
public Tracer getRootTracer()
public TransactionCache getTransactionCache()
public Transaction getTransaction()
public int hashCode()
hashCode in class java.lang.Object