Class UnitOfWork
java.lang.Object
com.kingsrook.qqq.backend.core.instrumentation.UnitOfWork
One unit of work on one thread (an HTTP request, a scheduled job, or a
process run outside both), opened and closed by core through
UnitsOfWork. Statements run while it is open are attributed to it.
The name may be refined while the unit is open (for example an HTTP
request learns its route template only after routing), so listeners that
need the final name read it in onUnitOfWorkEnd.-
Method Summary
Modifier and TypeMethodDescriptionlonggetId()JVM-unique id of this unit.getKind()What started this unit.getName()The unit's name: route template, job or process name.longSystem.nanoTime() when the unit began.voidRefine the name (e.g. once a request's route template is known).toString()Kind and name, for logs.
-
Method Details
-
getId
public long getId()JVM-unique id of this unit. -
getKind
What started this unit. -
getName
The unit's name: route template, job or process name. -
setName
Refine the name (e.g. once a request's route template is known). -
getStartNanos
public long getStartNanos()System.nanoTime() when the unit began. -
toString
-