Package ratpack.exec

Interface ExecControllerSpec

    • Method Detail

      • numThreads

        ExecControllerSpec numThreads​(int n)
        Sets the number of compute threads to use.

        Defaults to Runtime.getRuntime().availableProcessors() * 2.

        Parameters:
        n - the number of compute threads to use
        Returns:
        this
      • blockingThreadIdleTimeout

        ExecControllerSpec blockingThreadIdleTimeout​(java.time.Duration idleTimeout)
        The duration to allow a non-core blocking thread to remain in the pool before terminating it.

        Defaults to 60 seconds.

        Parameters:
        idleTimeout - the duration to allow a non-core blocking thread to remain in the pool before terminating it
        Returns:
        this
      • execInitializers

        ExecControllerSpec execInitializers​(java.lang.Iterable<? extends ExecInitializer> initializers)
        The exec initializers to use for initializing executions.
        Parameters:
        initializers - the exec initializers to use for initializing executions
        Returns:
        this
      • execInterceptors

        ExecControllerSpec execInterceptors​(java.lang.Iterable<? extends ExecInterceptor> interceptors)
        The exec interceptors to use for intercepting executions.
        Parameters:
        interceptors - exec interceptors to use for intercepting executions
        Returns:
        this
      • contextClassLoader

        ExecControllerSpec contextClassLoader​(java.lang.ClassLoader classLoader)
        The context classloader to initialize threads with.

        Defaults to the current context classloader of the thread that created this.

        Parameters:
        classLoader - the context classloader to initialize threads with
        Returns:
        this