public final class Concurrent
extends java.lang.Object
Constructor and Description |
---|
Concurrent() |
Modifier and Type | Method and Description |
---|---|
static java.util.concurrent.ThreadFactory |
namedThreadFactory(java.lang.String poolName)
Creates a thread factory.
|
static java.util.concurrent.ThreadPoolExecutor |
singleTaskExecutor(java.lang.String poolName)
Creates an executor that only allows execution of a single task at a time.
|
public static java.util.concurrent.ThreadFactory namedThreadFactory(java.lang.String poolName)
poolName
- Name of created threads (an auto-incrementing suffix is appended).public static java.util.concurrent.ThreadPoolExecutor singleTaskExecutor(java.lang.String poolName)