public class Worker<T extends Worker<T>> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Worker.WorkerResources
Child mutators for Worker
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a property change listener
|
Integer |
busyTaskThreadCount()
An estimate of busy threads in the task worker thread pool
|
T |
busyTaskThreadCount(Integer value)
An estimate of busy threads in the task worker thread pool
|
Integer |
corePoolSize()
Minimum number of threads to keep in the underlying thread pool even if
they are idle.
|
T |
corePoolSize(Integer value)
Minimum number of threads to keep in the underlying thread pool even if
they are idle.
|
String |
getKey() |
Integer |
ioThreadCount()
I/O thread count
|
T |
ioThreadCount(Integer value)
I/O thread count
|
Integer |
ioThreads()
Specify the number of I/O threads to create for the worker.
|
T |
ioThreads(Integer value)
Specify the number of I/O threads to create for the worker.
|
Integer |
maxPoolSize()
The maximum number of threads to allow in the thread pool.
|
T |
maxPoolSize(Integer value)
The maximum number of threads to allow in the thread pool.
|
T |
outboundBindAddress(List<OutboundBindAddress> value)
Add all OutboundBindAddress objects to this subresource
|
T |
outboundBindAddress(OutboundBindAddress value)
Add the OutboundBindAddress object to the list of subresources
|
T |
outboundBindAddress(OutboundBindAddressSupplier supplier)
Install a supplied OutboundBindAddress object to the list of subresources
|
T |
outboundBindAddress(String childKey)
Create and configure a OutboundBindAddress object to the list of
subresources
|
T |
outboundBindAddress(String childKey,
OutboundBindAddressConsumer consumer)
Create and configure a OutboundBindAddress object to the list of
subresources
|
Integer |
queueSize()
An estimate of the number of tasks in the worker queue.
|
T |
queueSize(Integer value)
An estimate of the number of tasks in the worker queue.
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a property change listener
|
T |
server(Server value)
Add the Server object to the list of subresources
|
T |
server(ServerSupplier supplier)
Install a supplied Server object to the list of subresources
|
T |
server(String childKey)
Create and configure a Server object to the list of subresources
|
T |
server(String childKey,
ServerConsumer consumer)
Create and configure a Server object to the list of subresources
|
T |
servers(List<Server> value)
Add all Server objects to this subresource
|
Boolean |
shutdownRequested()
True is shutdown of the pool was requested
|
T |
shutdownRequested(Boolean value)
True is shutdown of the pool was requested
|
Long |
stackSize()
The stack size (in bytes) to attempt to use for worker threads.
|
T |
stackSize(Long value)
The stack size (in bytes) to attempt to use for worker threads.
|
Worker.WorkerResources |
subresources() |
Integer |
taskCoreThreads()
Specify the starting number of threads for the worker task thread pool.
|
T |
taskCoreThreads(Integer value)
Specify the starting number of threads for the worker task thread pool.
|
Integer |
taskKeepalive()
Specify the number of milliseconds to keep non-core task threads alive.
|
T |
taskKeepalive(Integer value)
Specify the number of milliseconds to keep non-core task threads alive.
|
Integer |
taskMaxThreads()
Specify the maximum number of threads for the worker task thread pool.If
not set, default value used which is calculated by formula cpuCount *
16,as long as MaxFileDescriptorCount jmx property allows that number,
otherwise calculation takes max into account to adjust it accordingly.
|
T |
taskMaxThreads(Integer value)
Specify the maximum number of threads for the worker task thread pool.If
not set, default value used which is calculated by formula cpuCount *
16,as long as MaxFileDescriptorCount jmx property allows that number,
otherwise calculation takes max into account to adjust it accordingly.
|
public Worker(String key)
public String getKey()
public void addPropertyChangeListener(PropertyChangeListener listener)
public void removePropertyChangeListener(PropertyChangeListener listener)
public Worker.WorkerResources subresources()
public T servers(List<Server> value)
value
- List of Server objects.public T server(Server value)
value
- The Server to addpublic T server(String childKey, ServerConsumer consumer)
key
- The key for the Server resourceconfig
- The ServerConsumer to usepublic T server(String childKey)
key
- The key for the Server resourcepublic T server(ServerSupplier supplier)
public T outboundBindAddress(List<OutboundBindAddress> value)
value
- List of OutboundBindAddress objects.public T outboundBindAddress(OutboundBindAddress value)
value
- The OutboundBindAddress to addpublic T outboundBindAddress(String childKey, OutboundBindAddressConsumer consumer)
key
- The key for the OutboundBindAddress resourceconfig
- The OutboundBindAddressConsumer to usepublic T outboundBindAddress(String childKey)
key
- The key for the OutboundBindAddress resourcepublic T outboundBindAddress(OutboundBindAddressSupplier supplier)
public Integer busyTaskThreadCount()
public T busyTaskThreadCount(Integer value)
public Integer corePoolSize()
public T corePoolSize(Integer value)
public Integer ioThreadCount()
public Integer ioThreads()
public T ioThreads(Integer value)
public Integer maxPoolSize()
public T maxPoolSize(Integer value)
public Integer queueSize()
public Boolean shutdownRequested()
public T shutdownRequested(Boolean value)
public Long stackSize()
public T stackSize(Long value)
public Integer taskCoreThreads()
public T taskCoreThreads(Integer value)
public Integer taskKeepalive()
public T taskKeepalive(Integer value)
public Integer taskMaxThreads()
public T taskMaxThreads(Integer value)
Copyright © 2020 JBoss by Red Hat. All rights reserved.