ThreadPoolExecutor.setMaximumPoolSize

Sets the maximum allowed number of threads. This overrides any value set in the constructor. If the new value is smaller than the current value, excess existing threads will be terminated when they next become idle.

@param maximumPoolSize the new maximum @throws IllegalArgumentException if the new maximum is less than or equal to zero, or less than the {@linkplain #getCorePoolSize core pool size} @see #getMaximumPoolSize

class ThreadPoolExecutor
void
setMaximumPoolSize

Meta