org.wildfly.swarm.config.io

## Class Worker<T extends Worker<T>>

- java.lang.Object
- - org.wildfly.swarm.config.io.Worker<T>

-     public class Worker<T extends Worker<T>>
      extends Object

  Defines workers

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Worker.WorkerResources` Child mutators for Worker

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Worker(String key)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPropertyChangeListener(PropertyChangeListener listener)` Adds a property change listener
    `Integer` | `corePoolSize()` Minimum number of threads to keep in the underlying java.util.concurrent.ThreadPoolExecutor even if they are idle.
    `T` | `corePoolSize(Integer value)` Minimum number of threads to keep in the underlying java.util.concurrent.ThreadPoolExecutor 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` | `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.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Worker

          public Worker(String key)

  - ### Method Detail

    - #### getKey

          public String getKey()

    - #### addPropertyChangeListener

          public void addPropertyChangeListener(PropertyChangeListener listener)

      Adds a property change listener

    - #### removePropertyChangeListener

          public void removePropertyChangeListener(PropertyChangeListener listener)

      Removes a property change listener

    - #### subresources

          public Worker.WorkerResources subresources()

    - #### servers

          public T servers(List<Server> value)

      Add all Server objects to this subresource
      Parameters:
        `value` - List of Server objects.
      Returns:
        this

    - #### server

          public T server(Server value)

      Add the Server object to the list of subresources
      Parameters:
        `value` - The Server to add
      Returns:
        this

    - #### server

          public T server(String childKey,
                          ServerConsumer consumer)

      Create and configure a Server object to the list of subresources
      Parameters:
        `key` - The key for the Server resource
        `config` - The ServerConsumer to use
      Returns:
        this

    - #### server

          public T server(String childKey)

      Create and configure a Server object to the list of subresources
      Parameters:
        `key` - The key for the Server resource
      Returns:
        this

    - #### server

          public T server(ServerSupplier supplier)

      Install a supplied Server object to the list of subresources

    - #### outboundBindAddress

          public T outboundBindAddress(List<OutboundBindAddress> value)

      Add all OutboundBindAddress objects to this subresource
      Parameters:
        `value` - List of OutboundBindAddress objects.
      Returns:
        this

    - #### outboundBindAddress

          public T outboundBindAddress(OutboundBindAddress value)

      Add the OutboundBindAddress object to the list of subresources
      Parameters:
        `value` - The OutboundBindAddress to add
      Returns:
        this

    - #### outboundBindAddress

          public T outboundBindAddress(String childKey,
                                       OutboundBindAddressConsumer consumer)

      Create and configure a OutboundBindAddress object to the list of subresources
      Parameters:
        `key` - The key for the OutboundBindAddress resource
        `config` - The OutboundBindAddressConsumer to use
      Returns:
        this

    - #### outboundBindAddress

          public T outboundBindAddress(String childKey)

      Create and configure a OutboundBindAddress object to the list of subresources
      Parameters:
        `key` - The key for the OutboundBindAddress resource
      Returns:
        this

    - #### outboundBindAddress

          public T outboundBindAddress(OutboundBindAddressSupplier supplier)

      Install a supplied OutboundBindAddress object to the list of subresources

    - #### corePoolSize

          public Integer corePoolSize()

      Minimum number of threads to keep in the underlying java.util.concurrent.ThreadPoolExecutor even if they are idle. Threads over this limit will be terminated over time specified by task-keepalive attribute.

    - #### corePoolSize

          public T corePoolSize(Integer value)

      Minimum number of threads to keep in the underlying java.util.concurrent.ThreadPoolExecutor even if they are idle. Threads over this limit will be terminated over time specified by task-keepalive attribute.

    - #### ioThreadCount

          public Integer ioThreadCount()

      I/O thread count

    - #### ioThreadCount

          public T ioThreadCount(Integer value)

      I/O thread count

    - #### ioThreads

          public Integer ioThreads()

      Specify the number of I/O threads to create for the worker. If not specified, a default will be chosen, which is calculated by cpuCount * 2

    - #### ioThreads

          public T ioThreads(Integer value)

      Specify the number of I/O threads to create for the worker. If not specified, a default will be chosen, which is calculated by cpuCount * 2

    - #### maxPoolSize

          public Integer maxPoolSize()

      The maximum number of threads to allow in the thread pool. Depending on implementation, when this limit is reached, tasks which cannot be queued may be rejected.

    - #### maxPoolSize

          public T maxPoolSize(Integer value)

      The maximum number of threads to allow in the thread pool. Depending on implementation, when this limit is reached, tasks which cannot be queued may be rejected.

    - #### queueSize

          public Integer queueSize()

      An estimate of the number of tasks in the worker queue.

    - #### queueSize

          public T queueSize(Integer value)

      An estimate of the number of tasks in the worker queue.

    - #### shutdownRequested

          public Boolean shutdownRequested()

      True is shutdown of the pool was requested

    - #### shutdownRequested

          public T shutdownRequested(Boolean value)

      True is shutdown of the pool was requested

    - #### stackSize

          public Long stackSize()

      The stack size (in bytes) to attempt to use for worker threads.

    - #### stackSize

          public T stackSize(Long value)

      The stack size (in bytes) to attempt to use for worker threads.

    - #### taskKeepalive

          public Integer taskKeepalive()

      Specify the number of milliseconds to keep non-core task threads alive.

    - #### taskKeepalive

          public T taskKeepalive(Integer value)

      Specify the number of milliseconds to keep non-core task threads alive.

    - #### taskMaxThreads

          public 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.

    - #### taskMaxThreads

          public 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.

Copyright © 2017 JBoss by Red Hat. All rights reserved.