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
  • Constructor Details

    • InternalMonitor

      public InternalMonitor()
  • Method Details

    • 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 interface PrismMonitor
    • 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 interface PrismMonitor
    • afterObjectClone

      public <O extends Objectable> void afterObjectClone(@NotNull @NotNull PrismObject<O> orig, @Nullable @Nullable PrismObject<O> clone)
      Specified by:
      afterObjectClone in interface PrismMonitor
    • 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 interface PrismMonitor
    • afterObjectSerialization

      public void afterObjectSerialization(@NotNull @NotNull PrismObject<?> item)
      Specified by:
      afterObjectSerialization in interface PrismMonitor
    • 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 interface PrismMonitor
    • afterObjectParsing

      public void afterObjectParsing(@Nullable @Nullable PrismObject<?> object)
      Specified by:
      afterObjectParsing in interface PrismMonitor
    • 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 interface DebugDumpable
    • debugDumpStatic

      public static String debugDumpStatic(int indent)