Class RequestTrackerSettings


  • @ThreadSafe
    public final class RequestTrackerSettings
    extends Object
    Settings class for the Request tracker. Must be set before the first invocation.
    Since:
    9.6.1
    Author:
    Philip Helger
    • Field Detail

      • DEFAULT_LONG_RUNNING_CHECK_ENABLED

        public static final boolean DEFAULT_LONG_RUNNING_CHECK_ENABLED
        By default the long running checks are enabled
        See Also:
        Constant Field Values
      • DEFAULT_LONG_RUNNING_REQUESTS_CHECK_INTERVAL_MILLISECONDS

        public static final long DEFAULT_LONG_RUNNING_REQUESTS_CHECK_INTERVAL_MILLISECONDS
        By default the long running checks are executed every 2 seconds
        See Also:
        Constant Field Values
      • DEFAULT_LONG_RUNNING_NOTIFICATION_MILLISECONDS

        public static final long DEFAULT_LONG_RUNNING_NOTIFICATION_MILLISECONDS
        The number of a seconds a request needs to run before it is considered "long running". Defaults to 30.
        See Also:
        Constant Field Values
      • DEFAULT_PARALLEL_RUNNING_REQUESTS_CHECK_ENABLED

        public static final boolean DEFAULT_PARALLEL_RUNNING_REQUESTS_CHECK_ENABLED
        By default the parallel running checks are enabled
        See Also:
        Constant Field Values
      • DEFAULT_PARALLEL_RUNNING_REQUESTS_BARRIER

        public static final int DEFAULT_PARALLEL_RUNNING_REQUESTS_BARRIER
        The minimum number of parallel requests that trigger a warning message
        See Also:
        Constant Field Values
    • Method Detail

      • isLongRunningRequestsCheckEnabled

        public static boolean isLongRunningRequestsCheckEnabled()
        Returns:
        true if long running checks are enabled, false if not.
      • setLongRunningRequestsCheckEnabled

        public static void setLongRunningRequestsCheckEnabled​(boolean bEnabled)
      • getLongRunningRequestCheckIntervalMilliseconds

        @Nonnegative
        public static long getLongRunningRequestCheckIntervalMilliseconds()
        Returns:
        The interval in milliseconds, in which the system should check for long running requests. Always > 0.
      • setLongRunningRequestCheckIntervalMilliseconds

        public static void setLongRunningRequestCheckIntervalMilliseconds​(@Nonnegative
                                                                          long nSeconds)
      • getLongRunningRequestWarnDurationMillis

        @Nonnegative
        public static long getLongRunningRequestWarnDurationMillis()
        Returns:
        The milliseconds that need to pass by, before a request is considered "long running".
      • setLongRunningRequestWarnDurationMillis

        public static void setLongRunningRequestWarnDurationMillis​(@Nonnegative
                                                                   long nMilliseconds)
      • isParallelRunningRequestsCheckEnabled

        public static boolean isParallelRunningRequestsCheckEnabled()
        Returns:
        true if the check for parallel requests is enabled, false if not.
      • setParallelRunningRequestsCheckEnabled

        public static void setParallelRunningRequestsCheckEnabled​(boolean bEnabled)
      • getParallelRunningRequestBarrier

        @Nonnegative
        public static int getParallelRunningRequestBarrier()
        Returns:
        The minimum number of parallel requests that need to be exceeded, before a "parallel requests" warning is emitted. Always > 0.
      • setParallelRunningRequestBarrier

        public static void setParallelRunningRequestBarrier​(@Nonnegative
                                                            int nParallelRunningRequestBarrier)