Class ObjectOneWorkExecutor<O>

    • Constructor Detail

      • ObjectOneWorkExecutor

        @Deprecated(since="14.4.0",
                    forRemoval=true)
        public ObjectOneWorkExecutor​(boolean blockUntilFlush,
                                     Adept2ThreadFactory threadFactory)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates a new thread pool executor with an unlimited amount of threads and objects, accepting exactly one piece of work per object. It uses the designated thread factory for creating threads. The threads will stay idle for 60 seconds before they terminate.
        Parameters:
        blockUntilFlush - Whether work should be blocked for each object until the next flush. Otherwise work is allowed as soon as the work of the object has started.
        threadFactory - The factory to use when the executor creates a new thread.
      • ObjectOneWorkExecutor

        public ObjectOneWorkExecutor​(boolean blockUntilFlush,
                                     int maxPoolSize,
                                     Adept2ThreadFactory threadFactory)
        Creates a new thread pool executor with an unlimited amount objects and the designated maximum amount of threads, accepting exactly one piece of work per object. It uses the designated thread factory for creating threads. The threads will stay idle for 60 seconds before they terminate.
        Parameters:
        blockUntilFlush - Whether work should be blocked for each object until the next flush. Otherwise work is allowed as soon as the work of the object has started.
        maxPoolSize - The maximum number of threads allowed in the pool. Set this to the number of objects allowed to be executed concurrently or less.
        threadFactory - The factory to use when the executor creates a new thread.
      • ObjectOneWorkExecutor

        public ObjectOneWorkExecutor​(boolean blockUntilFlush,
                                     int corePoolSize,
                                     int maxPoolSize,
                                     Adept2ThreadFactory threadFactory)
        Creates a new thread pool executor with the designated (maximum) amount of (core) threads (and unlimited objects), accepting exactly one piece of work per object. It uses the designated thread factory for creating threads. The threads will stay idle for 60 seconds before they terminate.
        Parameters:
        blockUntilFlush - Whether work should be blocked for each object until the next flush. Otherwise work is allowed as soon as the work of the object has started.
        corePoolSize - The number of threads to keep in the pool all the time, even if they are idle.
        maxPoolSize - The maximum number of threads allowed in the pool. Set this to the number of objects allowed to be executed concurrently or less.
        threadFactory - The factory to use when the executor creates a new thread.
      • ObjectOneWorkExecutor

        @Deprecated(since="14.4.0",
                    forRemoval=true)
        public ObjectOneWorkExecutor​(boolean blockUntilFlush,
                                     int corePoolSize,
                                     int maxPoolSize,
                                     boolean prestart,
                                     Adept2ThreadFactory threadFactory)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates a new thread pool executor with the designated (maximum) amount of (core) threads (and unlimited objects), accepting exactly one piece of work per object. It uses the designated thread factory for creating threads. The threads will stay idle for 60 seconds before they terminate.
        Parameters:
        blockUntilFlush - Whether work should be blocked for each object until the next flush. Otherwise work is allowed as soon as the work of the object has started.
        corePoolSize - The number of threads to keep in the pool, even if they are idle.
        maxPoolSize - The maximum number of threads to allow in the pool.
        prestart - Whether all core threads should be prestarted.
        threadFactory - The factory to use when the executor creates a new thread.
      • ObjectOneWorkExecutor

        public ObjectOneWorkExecutor​(boolean blockUntilFlush,
                                     int corePoolSize,
                                     int maxPoolSize,
                                     Adept2ThreadFactory threadFactory,
                                     int queueLimitPoolStatistics,
                                     Level minLogLevelPoolStatistics)
        Creates a new thread pool executor with the designated (maximum) amount of (core) threads (and unlimited objects), accepting exactly one piece of work per object. It uses the designated thread factory for creating threads. The threads will stay idle for 60 seconds before they terminate.
        Parameters:
        blockUntilFlush - Whether work should be blocked for each object until the next flush. Otherwise work is allowed as soon as the work of the object has started.
        corePoolSize - The number of threads to keep in the pool all the time, even if they are idle.
        maxPoolSize - The maximum number of threads allowed in the pool. Set this to the number of objects allowed to be executed concurrently or less.
        threadFactory - The factory to use when the executor creates a new thread.
        queueLimitPoolStatistics - The amount of tasks in the queue before warnings will be logged. Use -1 to use the default limits.
        minLogLevelPoolStatistics - The log level which need to be reached for logging pool statistics. Pool statistics logs with a lower log level will be ignored.
      • ObjectOneWorkExecutor

        @Deprecated(since="14.4.0",
                    forRemoval=true)
        public ObjectOneWorkExecutor​(boolean blockUntilFlush,
                                     int corePoolSize,
                                     int maxPoolSize,
                                     boolean prestart,
                                     Adept2ThreadFactory threadFactory,
                                     int queueLimitPoolStatistics,
                                     Level minLogLevelPoolStatistics)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates a new thread pool executor with the designated (maximum) amount of (core) threads (and unlimited objects), accepting exactly one piece of work per object. It uses the designated thread factory for creating threads. The threads will stay idle for 60 seconds before they terminate.
        Parameters:
        blockUntilFlush - Whether work should be blocked for each object until the next flush. Otherwise work is allowed as soon as the work of the object has started.
        corePoolSize - The number of threads to keep in the pool, even if they are idle.
        maxPoolSize - The maximum number of threads to allow in the pool.
        prestart - Whether all core threads should be prestarted.
        threadFactory - The factory to use when the executor creates a new thread.
        queueLimitPoolStatistics - The amount of tasks in the queue before warnings will be logged. Use -1 to use the default limits.
        minLogLevelPoolStatistics - The log level which need to be reached for logging pool statistics. Pool statistics logs with a lower log level will be ignored.