public static enum ThreadPool.PoolPolicy extends Enum<ThreadPool.PoolPolicy>
| Enum Constant and Description |
|---|
CACHED
Maintain a "cached" thread pool.
|
FIXED
Maintain a fixed thread pool.
|
| Modifier and Type | Method and Description |
|---|---|
static ThreadPool.PoolPolicy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ThreadPool.PoolPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ThreadPool.PoolPolicy FIXED
ThreadPool.shutdown() or ThreadPool.shutdownNow() are called.Executors.newFixedThreadPool(int)public static final ThreadPool.PoolPolicy CACHED
Note that as opposed to Executors.newCachedThreadPool(), the specified pool size will never be
exceeded.
Executors.newCachedThreadPool()public static ThreadPool.PoolPolicy[] values()
for (ThreadPool.PoolPolicy c : ThreadPool.PoolPolicy.values()) System.out.println(c);
public static ThreadPool.PoolPolicy valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2020. All rights reserved.