Interface ThreadPoolMBean


  • @ProviderType
    public interface ThreadPoolMBean
    This is the management interface for a Sling Thread Pool.
    • Method Detail

      • getBlockPolicy

        java.lang.String getBlockPolicy()
        Retrieve the block policy of the thread pool.
        Returns:
        the block policy
      • getExecutorActiveCount

        int getExecutorActiveCount()
        Retrieve the active count from the pool's Executor.
        Returns:
        the active count or -1 if the thread pool does not have an Executor
      • getExecutorCompletedTaskCount

        long getExecutorCompletedTaskCount()
        Retrieve the completed task count from the pool's Executor.
        Returns:
        the completed task count or -1 if the thread pool does not have an Executor
      • getExecutorCorePoolSize

        int getExecutorCorePoolSize()
        Retrieve the core pool size from the pool's Executor.
        Returns:
        the core pool size or -1 if the thread pool does not have an Executor
      • getExecutorLargestPoolSize

        int getExecutorLargestPoolSize()
        Retrieve the largest pool size from the pool's Executor.
        Returns:
        the largest pool size or -1 if the thread pool does not have an Executor
      • getExecutorMaximumPoolSize

        int getExecutorMaximumPoolSize()
        Retrieve the maximum pool size from the pool's Executor.
        Returns:
        the maximum pool size or -1 if the thread pool does not have an Executor
      • getExecutorPoolSize

        int getExecutorPoolSize()
        Retrieve the pool size from the pool's Executor.
        Returns:
        the pool size or -1 if the thread pool does not have an Executor
      • getExecutorTaskCount

        long getExecutorTaskCount()
        Retrieve the task count from the pool's Executor.
        Returns:
        the task count or -1 if the thread pool does not have an Executor
      • getMaxThreadAge

        @Deprecated
        long getMaxThreadAge()
        Deprecated.
        Since version 1.1.1 always returns -1 as threads are no longer retired but instead the thread locals are cleaned up (SLING-6261)
        Return the configured max thread age.
        Returns:
        The configured max thread age.
      • getKeepAliveTime

        long getKeepAliveTime()
        Return the configured keep alive time.
        Returns:
        The configured keep alive time.
      • getMaxPoolSize

        int getMaxPoolSize()
        Return the configured maximum pool size.
        Returns:
        The configured maximum pool size.
      • getMinPoolSize

        int getMinPoolSize()
        Return the minimum pool size.
        Returns:
        The minimum pool size.
      • getName

        java.lang.String getName()
        Return the name of the thread pool
        Returns:
        the name
      • getPid

        java.lang.String getPid()
        Return the configuration pid of the thread pool.
        Returns:
        the pid
      • getPriority

        java.lang.String getPriority()
        Return the configured priority of the thread pool.
        Returns:
        the priority
      • getQueueSize

        int getQueueSize()
        Return the configured queue size.
        Returns:
        The configured queue size.
      • getShutdownWaitTimeMs

        int getShutdownWaitTimeMs()
        Return the configured shutdown wait time in milliseconds.
        Returns:
        The configured shutdown wait time.
      • isDaemon

        boolean isDaemon()
        Return whether or not the thread pool creates daemon threads.
        Returns:
        The daemon configuration.
      • isShutdownGraceful

        boolean isShutdownGraceful()
        Return whether or not the thread pool is configured to shutdown gracefully.
        Returns:
        The graceful shutdown configuration.
      • isUsed

        boolean isUsed()
        Return whether or not the thread pool is in use.
        Returns:
        The used state of the pool.