Class OperationInvocationRecord
java.lang.Object
com.evolveum.midpoint.util.statistics.OperationInvocationRecord
- All Implemented Interfaces:
Serializable
Represents an invocation of a single *operation* in the system. (Operation is typically implemented by a method or a set
of methods. But it may not be necessarily aligned to method's boundary.)
NOTE: History: This class provides basically the functionality of
MidpointInterceptor
. However, it was later
refactored to be callable also outside of the context of AOP - manually by injecting appropriate code, mimicking
MidpointInterceptor.invoke(MethodInvocation)
method. Currently, its main use is to manage the performance
data of the operations executed in the system in cooperation with the `OperationResult` class.
"Operation" may represent "operation invocation" in short (where no confusion is possible).- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterCall
(long notOwnTimeMicros) void
afterCall
(org.aopalliance.intercept.MethodInvocation invocation, long notOwnTimeMicros) static OperationInvocationRecord
static OperationInvocationRecord
create
(org.aopalliance.intercept.MethodInvocation invocation) static void
formatExecutionTime
(StringBuilder sb, long elapsed) long
long
long
long
<T extends Throwable>
TprocessException
(T e) processReturnValue
(Object returnValue) void
processReturnValue
(Map<String, Collection<String>> returns, Throwable cause) static String
swapSubsystemMark
(String subsystemName)
-
Method Details
-
create
public static OperationInvocationRecord create(org.aopalliance.intercept.MethodInvocation invocation) -
create
public static OperationInvocationRecord create(String operationName, Object[] arguments, boolean measureCpuTime) -
swapSubsystemMark
-
formatExecutionTime
-
processReturnValue
-
processReturnValue
-
processException
-
afterCall
public void afterCall(long notOwnTimeMicros) -
afterCall
public void afterCall(org.aopalliance.intercept.MethodInvocation invocation, long notOwnTimeMicros) -
getMethodName
-
getElapsedTimeMicros
public long getElapsedTimeMicros() -
getOwnTimeMicros
public long getOwnTimeMicros() -
getCpuTimeMicros
public long getCpuTimeMicros() -
getInvocationId
public long getInvocationId()
-