## Provided Capabilities (1)

Name | Dynamic | Other provider points
--- | --- | ---
org.wildfly.ee.concurrent.scheduled-executor | true | none

## Attributes (17)

- active-thread-count - The approximate number of threads that are actively executing tasks.

  Type | INT
  Where is the attribute stored? | runtime
  Access Type | metric
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "INT"
          },
          "description" : "The approximate number of threads that are actively executing tasks.",
          "expressions-allowed" : false,
          "required" : true,
          "nillable" : false,
          "stability" : "default",
          "access-type" : "metric",
          "storage" : "runtime",
          "restart-required" : null,
          "capability-reference" : null
      }

- completed-task-count - The approximate total number of tasks that have completed execution.

  Type | LONG
  Where is the attribute stored? | runtime
  Access Type | metric
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "LONG"
          },
          "description" : "The approximate total number of tasks that have completed execution.",
          "expressions-allowed" : false,
          "required" : true,
          "nillable" : false,
          "stability" : "default",
          "access-type" : "metric",
          "storage" : "runtime",
          "restart-required" : null,
          "capability-reference" : null
      }

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

  Type | STRING
  Is the attribute nillable? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | resource-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "STRING"
          },
          "description" : "The name of the context service to be used by the scheduled executor.",
          "expressions-allowed" : false,
          "required" : false,
          "nillable" : true,
          "capability-reference" : "org.wildfly.ee.concurrent.context.service",
          "min-length" : 0,
          "max-length" : 2147483647,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "resource-services"
      }

- core-threads - The number of threads to be used by the scheduled executor, even if they are idle. If this is not defined or is set to 0, the core pool size will be calculated based on the number of available processors.

  Type | INT
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | resource-services
  Min | 0
  Max | 2147483647
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "INT"
          },
          "description" : "The number of threads to be used by the scheduled executor, even if they are idle. If this is not defined or is set to 0, the core pool size will be calculated based on the number of available processors.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "min" : 0,
          "max" : 2147483647,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "resource-services",
          "capability-reference" : null
      }

- current-queue-size - The current size of the executor's task queue.

  Type | INT
  Where is the attribute stored? | runtime
  Access Type | metric
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "INT"
          },
          "description" : "The current size of the executor's task queue.",
          "expressions-allowed" : false,
          "required" : true,
          "nillable" : false,
          "stability" : "default",
          "access-type" : "metric",
          "storage" : "runtime",
          "restart-required" : null,
          "capability-reference" : null
      }

- hung-task-termination-period - The period, in milliseconds, for attempting hung tasks automatic termination, by cancelling such tasks, and interrupting their executing threads. If value is 0, which is the default, hung tasks are never cancelled.

  Type | LONG
  Default Value | 0
  Unit | MILLISECONDS
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | resource-services
  Min | 0
  Max | 9223372036854775807
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "LONG"
          },
          "description" : "The period, in milliseconds, for attempting hung tasks automatic termination, by cancelling such tasks, and interrupting their executing threads. If value is 0, which is the default, hung tasks are never cancelled.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "default" : 0,
          "unit" : "MILLISECONDS",
          "min" : 0,
          "max" : 9223372036854775807,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "resource-services",
          "capability-reference" : null
      }

- hung-task-threshold - The runtime, in milliseconds, for tasks to be considered hung by the scheduled executor. If 0 tasks are never considered hung.

  Type | LONG
  Default Value | 0
  Unit | MILLISECONDS
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | resource-services
  Min | 0
  Max | 9223372036854775807
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "LONG"
          },
          "description" : "The runtime, in milliseconds, for tasks to be considered hung by the scheduled executor. If 0 tasks are never considered hung.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "default" : 0,
          "unit" : "MILLISECONDS",
          "min" : 0,
          "max" : 9223372036854775807,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "resource-services",
          "capability-reference" : null
      }

- hung-thread-count - The number of executor threads that are hung.

  Type | INT
  Where is the attribute stored? | runtime
  Access Type | metric
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "INT"
          },
          "description" : "The number of executor threads that are hung.",
          "expressions-allowed" : false,
          "required" : true,
          "nillable" : false,
          "stability" : "default",
          "access-type" : "metric",
          "storage" : "runtime",
          "restart-required" : null,
          "capability-reference" : null
      }

- jndi-name - The JNDI Name to lookup the managed scheduled executor service.

  Type | STRING
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | resource-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "STRING"
          },
          "description" : "The JNDI Name to lookup the managed scheduled executor service.",
          "expressions-allowed" : true,
          "required" : true,
          "nillable" : false,
          "min-length" : 1,
          "max-length" : 2147483647,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "resource-services",
          "capability-reference" : null
      }

- keepalive-time - 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.

  Type | LONG
  Default Value | 60000
  Unit | MILLISECONDS
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | resource-services
  Min | 0
  Max | 9223372036854775807
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "LONG"
          },
          "description" : "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.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "default" : 60000,
          "unit" : "MILLISECONDS",
          "min" : 0,
          "max" : 9223372036854775807,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "resource-services",
          "capability-reference" : null
      }

- long-running-tasks - Flag which hints the duration of tasks executed by the scheduled executor.

  Type | BOOLEAN
  Default Value | false
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | resource-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "BOOLEAN"
          },
          "description" : "Flag which hints the duration of tasks executed by the scheduled executor.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "default" : false,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "resource-services",
          "capability-reference" : null
      }

- max-thread-count - The largest number of executor threads.

  Type | INT
  Where is the attribute stored? | runtime
  Access Type | metric
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "INT"
          },
          "description" : "The largest number of executor threads.",
          "expressions-allowed" : false,
          "required" : true,
          "nillable" : false,
          "stability" : "default",
          "access-type" : "metric",
          "storage" : "runtime",
          "restart-required" : null,
          "capability-reference" : null
      }

- reject-policy - The policy to be applied to aborted tasks.

  Type | STRING
  Default Value | ABORT
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | resource-services
  Allowed Values | RETRY_ABORT ABORT
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "STRING"
          },
          "description" : "The policy to be applied to aborted tasks.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "default" : "ABORT",
          "allowed" : [
              "ABORT",
              "RETRY_ABORT"
          ],
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "resource-services",
          "capability-reference" : null
      }

- task-count - The approximate total number of tasks that have ever been submitted for execution.

  Type | LONG
  Where is the attribute stored? | runtime
  Access Type | metric
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "LONG"
          },
          "description" : "The approximate total number of tasks that have ever been submitted for execution.",
          "expressions-allowed" : false,
          "required" : true,
          "nillable" : false,
          "stability" : "default",
          "access-type" : "metric",
          "storage" : "runtime",
          "restart-required" : null,
          "capability-reference" : null
      }

- thread-count - The current number of executor threads.

  Type | INT
  Where is the attribute stored? | runtime
  Access Type | metric
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "INT"
          },
          "description" : "The current number of executor threads.",
          "expressions-allowed" : false,
          "required" : true,
          "nillable" : false,
          "stability" : "default",
          "access-type" : "metric",
          "storage" : "runtime",
          "restart-required" : null,
          "capability-reference" : null
      }

- thread-factory - The name of the thread factory to be used by the scheduled executor.
  Deprecated Since 5.0.0
  Deprecated, the executor's thread factory should be configured using attribute named thread-priority.

  Type | STRING
  Is the attribute nillable? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | resource-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "STRING"
          },
          "description" : "The name of the thread factory to be used by the scheduled executor.",
          "expressions-allowed" : false,
          "required" : false,
          "nillable" : true,
          "alternatives" : ["thread-priority"],
          "capability-reference" : "org.wildfly.ee.concurrent.thread-factory",
          "min-length" : 0,
          "max-length" : 2147483647,
          "stability" : "default",
          "deprecated" : {
              "since" : "5.0.0",
              "reason" : "Deprecated, the executor's thread factory should be configured using attribute named thread-priority."
          },
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "resource-services"
      }

- thread-priority - The priority applied to threads created by the executor.

  Type | INT
  Default Value | 5
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | resource-services
  Min | 1
  Max | 10
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "INT"
          },
          "description" : "The priority applied to threads created by the executor.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "default" : 5,
          "alternatives" : ["thread-factory"],
          "min" : 1,
          "max" : 10,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "resource-services",
          "capability-reference" : null
      }

## Operations (3)

- add - Adds the scheduled executor

  Request Parameter | Type | Required | Expressions Allowed | Default value | Description
  --- | --- | --- | --- | --- | ---
  context-service | STRING | false | false |  | The name of the context service to be used by the scheduled executor.
  core-threads | INT | false | true |  | The number of threads to be used by the scheduled executor, even if they are idle. If this is not defined or is set to 0, the core pool size will be calculated based on the number of available processors.
  hung-task-termination-period | LONG | false | true | 0 | The period, in milliseconds, for attempting hung tasks automatic termination, by cancelling such tasks, and interrupting their executing threads. If value is 0, which is the default, hung tasks are never cancelled.
  hung-task-threshold | LONG | false | true | 0 | The runtime, in milliseconds, for tasks to be considered hung by the scheduled executor. If 0 tasks are never considered hung.
  jndi-name | STRING | true | true |  | The JNDI Name to lookup the managed scheduled executor service.
  keepalive-time | LONG | false | true | 60000 | 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.
  long-running-tasks | BOOLEAN | false | true | false | Flag which hints the duration of tasks executed by the scheduled executor.
  reject-policy | STRING | false | true | ABORT | The policy to be applied to aborted tasks.
  thread-factory | STRING | false | false |  | The name of the thread factory to be used by the scheduled executor.
  thread-priority | INT | false | true | 5 | The priority applied to threads created by the executor.

  Raw DMR model |
      {
          "operation-name" : "add",
          "description" : "Adds the scheduled executor",
          "request-properties" : {
              "context-service" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "STRING"
                  },
                  "description" : "The name of the context service to be used by the scheduled executor.",
                  "expressions-allowed" : false,
                  "required" : false,
                  "nillable" : true,
                  "capability-reference" : "org.wildfly.ee.concurrent.context.service",
                  "min-length" : 0,
                  "max-length" : 2147483647,
                  "stability" : "default"
              },
              "core-threads" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "INT"
                  },
                  "description" : "The number of threads to be used by the scheduled executor, even if they are idle. If this is not defined or is set to 0, the core pool size will be calculated based on the number of available processors.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "min" : 0,
                  "max" : 2147483647,
                  "stability" : "default"
              },
              "hung-task-termination-period" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "LONG"
                  },
                  "description" : "The period, in milliseconds, for attempting hung tasks automatic termination, by cancelling such tasks, and interrupting their executing threads. If value is 0, which is the default, hung tasks are never cancelled.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : 0,
                  "unit" : "MILLISECONDS",
                  "min" : 0,
                  "max" : 9223372036854775807,
                  "stability" : "default"
              },
              "hung-task-threshold" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "LONG"
                  },
                  "description" : "The runtime, in milliseconds, for tasks to be considered hung by the scheduled executor. If 0 tasks are never considered hung.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : 0,
                  "unit" : "MILLISECONDS",
                  "min" : 0,
                  "max" : 9223372036854775807,
                  "stability" : "default"
              },
              "jndi-name" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "STRING"
                  },
                  "description" : "The JNDI Name to lookup the managed scheduled executor service.",
                  "expressions-allowed" : true,
                  "required" : true,
                  "nillable" : false,
                  "min-length" : 1,
                  "max-length" : 2147483647,
                  "stability" : "default"
              },
              "keepalive-time" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "LONG"
                  },
                  "description" : "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.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : 60000,
                  "unit" : "MILLISECONDS",
                  "min" : 0,
                  "max" : 9223372036854775807,
                  "stability" : "default"
              },
              "long-running-tasks" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "BOOLEAN"
                  },
                  "description" : "Flag which hints the duration of tasks executed by the scheduled executor.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : false,
                  "stability" : "default"
              },
              "reject-policy" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "STRING"
                  },
                  "description" : "The policy to be applied to aborted tasks.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : "ABORT",
                  "allowed" : [
                      "ABORT",
                      "RETRY_ABORT"
                  ],
                  "stability" : "default"
              },
              "thread-factory" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "STRING"
                  },
                  "description" : "The name of the thread factory to be used by the scheduled executor.",
                  "expressions-allowed" : false,
                  "required" : false,
                  "nillable" : true,
                  "alternatives" : ["thread-priority"],
                  "capability-reference" : "org.wildfly.ee.concurrent.thread-factory",
                  "min-length" : 0,
                  "max-length" : 2147483647,
                  "stability" : "default",
                  "deprecated" : {
                      "since" : "5.0.0",
                      "reason" : "Deprecated, the executor's thread factory should be configured using attribute named thread-priority."
                  }
              },
              "thread-priority" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "INT"
                  },
                  "description" : "The priority applied to threads created by the executor.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : 5,
                  "alternatives" : ["thread-factory"],
                  "min" : 1,
                  "max" : 10,
                  "stability" : "default"
              }
          },
          "reply-properties" : {},
          "stability" : "default",
          "read-only" : false,
          "runtime-only" : false
      }

- remove - Removes the scheduled executor.

  Raw DMR model |
      {
          "operation-name" : "remove",
          "description" : "Removes the scheduled executor.",
          "request-properties" : {},
          "reply-properties" : {},
          "stability" : "default",
          "read-only" : false,
          "restart-required" : "all-services",
          "runtime-only" : false
      }

- terminate-hung-tasks - Attempts to terminate the scheduled executor's hung tasks, by cancelling such tasks, and interrupting their executing threads.

  Raw DMR model |
      {
          "operation-name" : "terminate-hung-tasks",
          "description" : "Attempts to terminate the scheduled executor's hung tasks, by cancelling such tasks, and interrupting their executing threads.",
          "request-properties" : {},
          "reply-properties" : {},
          "stability" : "default",
          "read-only" : false,
          "runtime-only" : true
      }

## Galleon Features

Galleon features are to be used when creating Galleon feature-packs.

- subsystem.ee.managed-scheduled-executor-service

      <feature spec="subsystem.ee.managed-scheduled-executor-service">
        <param name="managed-scheduled-executor-service" value="{resource name}"/>
        <param name="context-service" value="{value}"/>
        <param name="core-threads" value="{value}"/>
        <param name="hung-task-termination-period" value="{value}"/>
        <param name="hung-task-threshold" value="{value}"/>
        <param name="jndi-name" value="{value}"/>
        <param name="keepalive-time" value="{value}"/>
        <param name="long-running-tasks" value="{value}"/>
        <param name="reject-policy" value="{value}"/>
        <param name="thread-factory" value="{value}"/>
        <param name="thread-priority" value="{value}"/>
      <feature/>