public static class ServiceContainer.Factory extends Object
Modifier and Type | Method and Description |
---|---|
static ServiceContainer |
create()
Create a new instance with a generated name and default thread pool.
|
static ServiceContainer |
create(boolean autoShutdown)
Create a new instance with a generated name and default thread pool.
|
static ServiceContainer |
create(int coreSize,
long keepAliveTime,
TimeUnit keepAliveTimeUnit)
Create a new instance with a generated name and specified initial thread pool settings.
|
static ServiceContainer |
create(int coreSize,
long keepAliveTime,
TimeUnit keepAliveTimeUnit,
boolean autoShutdown)
Create a new instance with a generated name and specified initial thread pool settings.
|
static ServiceContainer |
create(String name)
Create a new instance with a given name and default thread pool.
|
static ServiceContainer |
create(String name,
boolean autoShutdown)
Create a new instance with a given name and default thread pool.
|
static ServiceContainer |
create(String name,
int coreSize,
long keepAliveTime,
TimeUnit keepAliveTimeUnit)
Create a new instance with a given name and specified initial thread pool settings.
|
static ServiceContainer |
create(String name,
int coreSize,
long keepAliveTime,
TimeUnit keepAliveTimeUnit,
boolean autoShutdown)
Create a new instance with a given name and specified initial thread pool settings.
|
public static ServiceContainer create()
public static ServiceContainer create(String name)
name
- the name of the new containerpublic static ServiceContainer create(int coreSize, long keepAliveTime, TimeUnit keepAliveTimeUnit)
coreSize
- the core pool size (must be greater than zero)keepAliveTime
- the amount of time that non-core threads should linger without taskskeepAliveTimeUnit
- the time unit for keepAliveTime
public static ServiceContainer create(String name, int coreSize, long keepAliveTime, TimeUnit keepAliveTimeUnit)
name
- the name of the new containercoreSize
- the core pool size (must be greater than zero)keepAliveTime
- the amount of time that non-core threads should linger without taskskeepAliveTimeUnit
- the time unit for keepAliveTime
public static ServiceContainer create(boolean autoShutdown)
autoShutdown
- true
to automatically shut down the container at VM exit, false
otherwisepublic static ServiceContainer create(String name, boolean autoShutdown)
name
- the name of the new containerautoShutdown
- true
to automatically shut down the container at VM exit, false
otherwisepublic static ServiceContainer create(int coreSize, long keepAliveTime, TimeUnit keepAliveTimeUnit, boolean autoShutdown)
coreSize
- the core pool size (must be greater than zero)keepAliveTime
- the amount of time that non-core threads should linger without taskskeepAliveTimeUnit
- the time unit for keepAliveTime
autoShutdown
- true
to automatically shut down the container at VM exit, false
otherwisepublic static ServiceContainer create(String name, int coreSize, long keepAliveTime, TimeUnit keepAliveTimeUnit, boolean autoShutdown)
name
- the name of the new containercoreSize
- the core pool size (must be greater than zero)keepAliveTime
- the amount of time that non-core threads should linger without taskskeepAliveTimeUnit
- the time unit for keepAliveTime
autoShutdown
- true
to automatically shut down the container at VM exit, false
otherwiseCopyright © 2017 JBoss by Red Hat. All rights reserved.