Class QueueConsumingThreadPoolOptions.Builder<T>

  • Type Parameters:
    T -
    Enclosing class:
    QueueConsumingThreadPoolOptions<T>

    public static class QueueConsumingThreadPoolOptions.Builder<T>
    extends java.lang.Object
    Queue consuming thread pool options builder.
    Since:
    17.0.0
    Version:
    $Revision$ $Date$
    • Method Detail

      • movingAverageWaitTimeInSeconds

        public QueueConsumingThreadPoolOptions.Builder<T> movingAverageWaitTimeInSeconds​(java.lang.Integer movingAverageWaitTimeInSeconds)
        Set moving average wait time in seconds.
        Parameters:
        movingAverageWaitTimeInSeconds - the moving average wait time in seconds
        Returns:
        the builder
        Since:
        17.0.0
      • queueCapacity

        public QueueConsumingThreadPoolOptions.Builder<T> queueCapacity​(java.lang.Integer queueCapacity)
        Set queue capacity.
        Parameters:
        queueCapacity - the queue capacity
        Returns:
        the builder
        Since:
        17.0.0
      • processThreadName

        public QueueConsumingThreadPoolOptions.Builder<T> processThreadName​(java.lang.String processThreadName)
        Set process thread name.
        Parameters:
        processThreadName - the process thread name
        Returns:
        the builder
        Since:
        17.0.0
      • numberOfProcessThreads

        public QueueConsumingThreadPoolOptions.Builder<T> numberOfProcessThreads​(java.lang.Integer numberOfProcessThreads)
        Set number of process threads.
        Parameters:
        numberOfProcessThreads - the number of process threads
        Returns:
        the builder
        Since:
        17.0.0
      • metricsCalculatorThreadName

        public QueueConsumingThreadPoolOptions.Builder<T> metricsCalculatorThreadName​(java.lang.String metricsCalculatorThreadName)
        Set metrics calculator thread name.
        Parameters:
        metricsCalculatorThreadName - the metrics calculator thread name
        Returns:
        the builder
        Since:
        17.0.0
      • onRejectHandler

        public QueueConsumingThreadPoolOptions.Builder<T> onRejectHandler​(java.util.function.Consumer<java.lang.Runnable> onRejectHandler)
        Set on reject handler.
        Parameters:
        onRejectHandler - the on reject handler
        Returns:
        the builder
        Since:
        17.0.0
      • onDuplicatedItemRejectedHandler

        public QueueConsumingThreadPoolOptions.Builder<T> onDuplicatedItemRejectedHandler​(java.util.function.BiConsumer<java.lang.Runnable,​T> onDuplicatedItemRejectedHandler)
        Set on duplicated item rejected handler.
        Parameters:
        onDuplicatedItemRejectedHandler - the on duplicated item rejected handler
        Returns:
        the builder
        Since:
        17.0.0
      • build

        public QueueConsumingThreadPoolOptions<T> build()
        Build the queue consuming thread pool options.
        Returns:
        the queue consuming thread pool options
        Since:
        17.0.0