Class RequestCountingUtil

    • Constructor Detail

      • RequestCountingUtil

        public RequestCountingUtil()
    • Method Detail

      • register

        public static void register​(org.zeroturnaround.javarebel.RebelServletContext context)
      • unregister

        public static void unregister​(org.zeroturnaround.javarebel.RebelServletContext context)
      • countRunning

        public static int countRunning​(org.zeroturnaround.javarebel.RebelServletContext context)
      • waitUntilNoRunning

        public static boolean waitUntilNoRunning​(org.zeroturnaround.javarebel.RebelServletContext context,
                                                 long timeout)
                                          throws InterruptedException
        Waits until there are no requests currently running.
        Parameters:
        context - Servlet Context of the application.
        timeout - maximum time to wait for.
        Returns:
        true if there are no requests running, false if timeout was reached.
        Throws:
        InterruptedException