Class MemoryAwareThreadPoolExecutor

    • Constructor Detail

      • MemoryAwareThreadPoolExecutor

        public MemoryAwareThreadPoolExecutor​(int corePoolSize,
                                             long maxChannelMemorySize,
                                             long maxTotalMemorySize)
        Creates a new instance.
        Parameters:
        corePoolSize - the maximum number of active threads
        maxChannelMemorySize - the maximum total size of the queued events per channel. Specify 0 to disable.
        maxTotalMemorySize - the maximum total size of the queued events for this pool Specify 0 to disable.
      • MemoryAwareThreadPoolExecutor

        public MemoryAwareThreadPoolExecutor​(int corePoolSize,
                                             long maxChannelMemorySize,
                                             long maxTotalMemorySize,
                                             long keepAliveTime,
                                             TimeUnit unit)
        Creates a new instance.
        Parameters:
        corePoolSize - the maximum number of active threads
        maxChannelMemorySize - the maximum total size of the queued events per channel. Specify 0 to disable.
        maxTotalMemorySize - the maximum total size of the queued events for this pool Specify 0 to disable.
        keepAliveTime - the amount of time for an inactive thread to shut itself down
        unit - the TimeUnit of keepAliveTime
      • MemoryAwareThreadPoolExecutor

        public MemoryAwareThreadPoolExecutor​(int corePoolSize,
                                             long maxChannelMemorySize,
                                             long maxTotalMemorySize,
                                             long keepAliveTime,
                                             TimeUnit unit,
                                             ThreadFactory threadFactory)
        Creates a new instance.
        Parameters:
        corePoolSize - the maximum number of active threads
        maxChannelMemorySize - the maximum total size of the queued events per channel. Specify 0 to disable.
        maxTotalMemorySize - the maximum total size of the queued events for this pool Specify 0 to disable.
        keepAliveTime - the amount of time for an inactive thread to shut itself down
        unit - the TimeUnit of keepAliveTime
        threadFactory - the ThreadFactory of this pool
      • MemoryAwareThreadPoolExecutor

        public MemoryAwareThreadPoolExecutor​(int corePoolSize,
                                             long maxChannelMemorySize,
                                             long maxTotalMemorySize,
                                             long keepAliveTime,
                                             TimeUnit unit,
                                             ObjectSizeEstimator objectSizeEstimator,
                                             ThreadFactory threadFactory)
        Creates a new instance.
        Parameters:
        corePoolSize - the maximum number of active threads
        maxChannelMemorySize - the maximum total size of the queued events per channel. Specify 0 to disable.
        maxTotalMemorySize - the maximum total size of the queued events for this pool Specify 0 to disable.
        keepAliveTime - the amount of time for an inactive thread to shut itself down
        unit - the TimeUnit of keepAliveTime
        threadFactory - the ThreadFactory of this pool
        objectSizeEstimator - the ObjectSizeEstimator of this pool