org.wildfly.swarm.config.ee

## Class ManagedExecutorService<T extends ManagedExecutorService<T>>

- java.lang.Object
- - java.util.AbstractMap<K,V>
  - - java.util.HashMap
    - - org.wildfly.swarm.config.ee.ManagedExecutorService<T>

- All Implemented Interfaces:
    Serializable, Cloneable, Map

      public class ManagedExecutorService<T extends ManagedExecutorService<T>>
      extends HashMap

  A managed executor service
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.AbstractMap

      `AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>`

    - ### Nested classes/interfaces inherited from interface java.util.Map

      `Map.Entry<K,V>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ManagedExecutorService(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
    `String` | `contextService()` The name of the context service to be used by the executor.
    `T` | `contextService(String value)` The name of the context service to be used by the executor.
    `Integer` | `coreThreads()` The minimum number of threads to be used by the executor.
    `T` | `coreThreads(Integer value)` The minimum number of threads to be used by the executor.
    `String` | `getKey()`
    `Long` | `hungTaskThreshold()` The runtime, in milliseconds, for tasks to be considered hung by the managed executor service.
    `T` | `hungTaskThreshold(Long value)` The runtime, in milliseconds, for tasks to be considered hung by the managed executor service.
    `String` | `jndiName()` The JNDI Name to lookup the managed executor service.
    `T` | `jndiName(String value)` The JNDI Name to lookup the managed executor service.
    `Long` | `keepaliveTime()` When the number of threads is greater than the core, this is the maximum time, in milliseconds, that excess idle threads will wait for new tasks before terminating.
    `T` | `keepaliveTime(Long value)` When the number of threads is greater than the core, this is the maximum time, in milliseconds, that excess idle threads will wait for new tasks before terminating.
    `Boolean` | `longRunningTasks()` Flag which hints the duration of tasks executed by the executor.
    `T` | `longRunningTasks(Boolean value)` Flag which hints the duration of tasks executed by the executor.
    `Integer` | `maxThreads()` The maximum number of threads to be used by the executor.
    `T` | `maxThreads(Integer value)` The maximum number of threads to be used by the executor.
    `Integer` | `queueLength()` The executors task queue capacity.
    `T` | `queueLength(Integer value)` The executors task queue capacity.
    `RejectPolicy` | `rejectPolicy()` The policy to be applied to aborted tasks.
    `T` | `rejectPolicy(RejectPolicy value)` The policy to be applied to aborted tasks.
    `void` | `removePropertyChangeListener(PropertyChangeListener listener)` Removes a property change listener
    `String` | `threadFactory()` The name of the thread factory to be used by the executor.
    `T` | `threadFactory(String value)` The name of the thread factory to be used by the executor.

    - ### Methods inherited from class java.util.HashMap

      `clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values`

    - ### Methods inherited from class java.util.AbstractMap

      `equals, hashCode, toString`

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

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Map

      `equals, hashCode`

- - ### Constructor Detail

    - #### ManagedExecutorService

          public ManagedExecutorService(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

    - #### contextService

          public String contextService()

      The name of the context service to be used by the executor.

    - #### contextService

          public T contextService(String value)

      The name of the context service to be used by the executor.

    - #### coreThreads

          public Integer coreThreads()

      The minimum number of threads to be used by the executor. If left undefined the default core-size is calculated based on the number of processors. A value of zero is not advised and in some cases invalid. See the queue-length attribute for details on how this value is used to determine the queuing strategy.

    - #### coreThreads

          public T coreThreads(Integer value)

      The minimum number of threads to be used by the executor. If left undefined the default core-size is calculated based on the number of processors. A value of zero is not advised and in some cases invalid. See the queue-length attribute for details on how this value is used to determine the queuing strategy.

    - #### hungTaskThreshold

          public Long hungTaskThreshold()

      The runtime, in milliseconds, for tasks to be considered hung by the managed executor service. If value is 0 tasks are never considered hung.

    - #### hungTaskThreshold

          public T hungTaskThreshold(Long value)

      The runtime, in milliseconds, for tasks to be considered hung by the managed executor service. If value is 0 tasks are never considered hung.

    - #### jndiName

          public String jndiName()

      The JNDI Name to lookup the managed executor service.

    - #### jndiName

          public T jndiName(String value)

      The JNDI Name to lookup the managed executor service.

    - #### keepaliveTime

          public Long keepaliveTime()

      When the number of threads is greater than the core, this is the maximum time, in milliseconds, that excess idle threads will wait for new tasks before terminating.

    - #### keepaliveTime

          public T keepaliveTime(Long value)

      When the number of threads is greater than the core, this is the maximum time, in milliseconds, that excess idle threads will wait for new tasks before terminating.

    - #### longRunningTasks

          public Boolean longRunningTasks()

      Flag which hints the duration of tasks executed by the executor.

    - #### longRunningTasks

          public T longRunningTasks(Boolean value)

      Flag which hints the duration of tasks executed by the executor.

    - #### maxThreads

          public Integer maxThreads()

      The maximum number of threads to be used by the executor. If left undefined the value from core-size will be used. This value is ignored if an unbounded queue is used (only core-threads will be used in that case).

    - #### maxThreads

          public T maxThreads(Integer value)

      The maximum number of threads to be used by the executor. If left undefined the value from core-size will be used. This value is ignored if an unbounded queue is used (only core-threads will be used in that case).

    - #### queueLength

          public Integer queueLength()

      The executors task queue capacity. A length of 0 means direct hand-off and possible rejection will occur. An undefined length (the default), or Integer.MAX_VALUE, indicates that an unbounded queue should be used. All other values specify an exact queue size. If an unbounded queue or direct hand-off is used, a core-threads value greater than zero is required.

    - #### queueLength

          public T queueLength(Integer value)

      The executors task queue capacity. A length of 0 means direct hand-off and possible rejection will occur. An undefined length (the default), or Integer.MAX_VALUE, indicates that an unbounded queue should be used. All other values specify an exact queue size. If an unbounded queue or direct hand-off is used, a core-threads value greater than zero is required.

    - #### rejectPolicy

          public RejectPolicy rejectPolicy()

      The policy to be applied to aborted tasks.

    - #### rejectPolicy

          public T rejectPolicy(RejectPolicy value)

      The policy to be applied to aborted tasks.

    - #### threadFactory

          public String threadFactory()

      The name of the thread factory to be used by the executor.

    - #### threadFactory

          public T threadFactory(String value)

      The name of the thread factory to be used by the executor.

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