Class InternalMonitor
- java.lang.Object
-
- com.evolveum.midpoint.schema.internals.InternalMonitor
-
- All Implemented Interfaces:
PrismMonitor
,DebugDumpable
public class InternalMonitor extends Object implements PrismMonitor, DebugDumpable
Simple monitoring object. It records the count of expensive operations in the system. It is used in the tests to make sure such operations are not executed more frequently than expected. It may also have some run-time value.- Author:
- Radovan Semancik
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description InternalMonitor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <O extends Objectable>
voidafterObjectClone(@NotNull PrismObject<O> orig, @Nullable PrismObject<O> clone)
void
afterObjectParsing(@Nullable PrismObject<?> object)
void
afterObjectSerialization(@NotNull PrismObject<?> item)
<O extends Objectable>
voidbeforeObjectClone(@NotNull PrismObject<O> orig)
void
beforeObjectParsing()
Beware! This may not cover all object parsing operations.void
beforeObjectSerialization(@NotNull PrismObject<?> item)
Beware! This may not cover all object serializations.String
debugDump(int indent)
static String
debugDumpStatic(int indent)
static CachingStatistics
getConnectorCacheStats()
static long
getCount(InternalCounters counter)
static InternalInspector
getInspector()
static long
getPrismObjectCloneDurationMillis()
static CachingStatistics
getResourceCacheStats()
static boolean
isCloneTimingEnabled()
static boolean
isTrace(InternalOperationClasses operationClass)
static void
recordConnectorModification(String name)
static void
recordConnectorOperation(String name)
static void
recordCount(InternalCounters counter)
<O extends Objectable>
voidrecordPrismObjectCompareCount(PrismObject<O> thisObject, Object thatObject)
static <O extends ObjectType>
voidrecordRepositoryRead(Class<O> type, String oid)
static <F extends AssignmentHolderType>
voidrecordRoleEvaluation(F target, boolean fullEvaluation)
static <F extends AssignmentHolderType>
voidrecordRoleEvaluationSkip(F target, boolean fullEvaluation)
static void
reset()
static void
setCloneTimingEnabled(boolean cloneTimingEnabled)
static void
setInspector(InternalInspector inspector)
static void
setPrismObjectCloneDurationMillis(long prismObjectCloneDurationNanos)
static void
setTrace(InternalCounters counter, boolean val)
static void
setTrace(InternalOperationClasses operationClass, boolean val)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
-
-
-
Method Detail
-
getCount
public static long getCount(InternalCounters counter)
-
recordCount
public static void recordCount(InternalCounters counter)
-
isTrace
public static boolean isTrace(InternalOperationClasses operationClass)
-
setTrace
public static void setTrace(InternalOperationClasses operationClass, boolean val)
-
setTrace
public static void setTrace(InternalCounters counter, boolean val)
-
getResourceCacheStats
public static CachingStatistics getResourceCacheStats()
-
getConnectorCacheStats
public static CachingStatistics getConnectorCacheStats()
-
recordConnectorOperation
public static void recordConnectorOperation(String name)
-
recordConnectorModification
public static void recordConnectorModification(String name)
-
recordRepositoryRead
public static <O extends ObjectType> void recordRepositoryRead(Class<O> type, String oid)
-
recordPrismObjectCompareCount
public <O extends Objectable> void recordPrismObjectCompareCount(PrismObject<O> thisObject, Object thatObject)
- Specified by:
recordPrismObjectCompareCount
in interfacePrismMonitor
-
isCloneTimingEnabled
public static boolean isCloneTimingEnabled()
-
setCloneTimingEnabled
public static void setCloneTimingEnabled(boolean cloneTimingEnabled)
-
getPrismObjectCloneDurationMillis
public static long getPrismObjectCloneDurationMillis()
-
setPrismObjectCloneDurationMillis
public static void setPrismObjectCloneDurationMillis(long prismObjectCloneDurationNanos)
-
beforeObjectClone
public <O extends Objectable> void beforeObjectClone(@NotNull @NotNull PrismObject<O> orig)
- Specified by:
beforeObjectClone
in interfacePrismMonitor
-
afterObjectClone
public <O extends Objectable> void afterObjectClone(@NotNull @NotNull PrismObject<O> orig, @Nullable @Nullable PrismObject<O> clone)
- Specified by:
afterObjectClone
in interfacePrismMonitor
-
beforeObjectSerialization
public void beforeObjectSerialization(@NotNull @NotNull PrismObject<?> item)
Description copied from interface:PrismMonitor
Beware! This may not cover all object serializations. Hopefully at least the majority.- Specified by:
beforeObjectSerialization
in interfacePrismMonitor
-
afterObjectSerialization
public void afterObjectSerialization(@NotNull @NotNull PrismObject<?> item)
- Specified by:
afterObjectSerialization
in interfacePrismMonitor
-
beforeObjectParsing
public void beforeObjectParsing()
Description copied from interface:PrismMonitor
Beware! This may not cover all object parsing operations. Hopefully at least the majority.- Specified by:
beforeObjectParsing
in interfacePrismMonitor
-
afterObjectParsing
public void afterObjectParsing(@Nullable @Nullable PrismObject<?> object)
- Specified by:
afterObjectParsing
in interfacePrismMonitor
-
recordRoleEvaluation
public static <F extends AssignmentHolderType> void recordRoleEvaluation(F target, boolean fullEvaluation)
-
recordRoleEvaluationSkip
public static <F extends AssignmentHolderType> void recordRoleEvaluationSkip(F target, boolean fullEvaluation)
-
getInspector
public static InternalInspector getInspector()
-
setInspector
public static void setInspector(InternalInspector inspector)
-
reset
public static void reset()
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
-
debugDumpStatic
public static String debugDumpStatic(int indent)
-
-