public enum ThreadModel extends Enum<ThreadModel>
| Enum Constant and Description |
|---|
SHARED_THREAD_POOL
A thread model that creates a thread pool to be shared by all services.
|
THREAD_PER_SERVICE
A thread model that creates a thread for each Raft service.
|
| Modifier and Type | Method and Description |
|---|---|
abstract ThreadContextFactory |
factory(String nameFormat,
int threadPoolSize,
org.slf4j.Logger logger)
Returns a thread context factory.
|
static ThreadModel |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ThreadModel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ThreadModel SHARED_THREAD_POOL
public static final ThreadModel THREAD_PER_SERVICE
public static ThreadModel[] values()
for (ThreadModel c : ThreadModel.values()) System.out.println(c);
public static ThreadModel 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 nullpublic abstract ThreadContextFactory factory(String nameFormat, int threadPoolSize, org.slf4j.Logger logger)
nameFormat - the thread name formatthreadPoolSize - the thread pool sizelogger - the thread loggerCopyright © 2013–2019. All rights reserved.