## Provided Capabilities (1)

Name | Dynamic | Other provider points
--- | --- | ---
org.wildfly.batch.thread.pool | true | none

## Attributes (11)

- active-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 | INT
  Where is the attribute stored? | runtime
  Access Type | metric
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "INT"
          },
          "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
      }

- current-thread-count - The current number of threads in the pool.

  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 threads in the pool.",
          "expressions-allowed" : false,
          "required" : true,
          "nillable" : false,
          "stability" : "default",
          "access-type" : "metric",
          "storage" : "runtime",
          "restart-required" : null,
          "capability-reference" : null
      }

- keepalive-time - Used to specify the amount of time that pool threads should be kept running when idle; if not specified, threads will run until the executor is shut down.

  Type | OBJECT
  Is the attribute nillable? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | no-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "OBJECT"
          },
          "description" : "Used to specify the amount of time that pool threads should be kept running when idle; if not specified, threads will run until the executor is shut down.",
          "expressions-allowed" : false,
          "required" : false,
          "nillable" : true,
          "stability" : "default",
          "value-type" : {
              "time" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "LONG"
                  },
                  "description" : "The time",
                  "expressions-allowed" : true,
                  "required" : true,
                  "nillable" : false,
                  "stability" : "default"
              },
              "unit" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "STRING"
                  },
                  "description" : "The time unit",
                  "expressions-allowed" : true,
                  "required" : true,
                  "nillable" : false,
                  "allowed" : [
                      "NANOSECONDS",
                      "MICROSECONDS",
                      "MILLISECONDS",
                      "SECONDS",
                      "MINUTES",
                      "HOURS",
                      "DAYS"
                  ],
                  "stability" : "default"
              }
          },
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "no-services",
          "capability-reference" : null
      }

- largest-thread-count - The largest number of threads that have ever simultaneously been in the pool.

  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 threads that have ever simultaneously been in the pool.",
          "expressions-allowed" : false,
          "required" : true,
          "nillable" : false,
          "stability" : "default",
          "access-type" : "metric",
          "storage" : "runtime",
          "restart-required" : null,
          "capability-reference" : null
      }

- max-threads - The maximum thread pool size. Note this should always be greater than 3. Two threads are reserved to ensure partition jobs can execute as expected.

  Type | INT
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | no-services
  Min | 0
  Max | 2147483647
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "INT"
          },
          "description" : "The maximum thread pool size. Note this should always be greater than 3. Two threads are reserved to ensure partition jobs can execute as expected.",
          "expressions-allowed" : true,
          "required" : true,
          "nillable" : false,
          "min" : 0,
          "max" : 2147483647,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "no-services",
          "capability-reference" : null
      }

- name - The name of the thread pool.

  Type | STRING
  Is the attribute nillable? | true
  Where is the attribute stored? | configuration
  Access Type | read-only
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "STRING"
          },
          "description" : "The name of the thread pool.",
          "expressions-allowed" : false,
          "required" : false,
          "nillable" : true,
          "min-length" : 1,
          "max-length" : 2147483647,
          "stability" : "default",
          "access-type" : "read-only",
          "storage" : "configuration",
          "restart-required" : null,
          "capability-reference" : null
      }

- queue-size - The queue size.

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

- rejected-count - The number of tasks that have been rejected.

  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 tasks that have been rejected.",
          "expressions-allowed" : false,
          "required" : true,
          "nillable" : false,
          "stability" : "default",
          "access-type" : "metric",
          "storage" : "runtime",
          "restart-required" : null,
          "capability-reference" : null
      }

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

  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 total number of tasks that have ever been scheduled for execution.",
          "expressions-allowed" : false,
          "required" : true,
          "nillable" : false,
          "stability" : "default",
          "access-type" : "metric",
          "storage" : "runtime",
          "restart-required" : null,
          "capability-reference" : null
      }

- thread-factory - Specifies the name of a specific thread factory to use to create worker threads. If not defined an appropriate default thread factory will be used.

  Type | STRING
  Is the attribute nillable? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | all-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "STRING"
          },
          "description" : "Specifies the name of a specific thread factory to use to create worker threads. If not defined an appropriate default thread factory will be used.",
          "expressions-allowed" : false,
          "required" : false,
          "nillable" : true,
          "capability-reference" : "org.wildfly.threads.thread-factory",
          "min-length" : 1,
          "max-length" : 2147483647,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "all-services"
      }

## Operations (2)

- add - Adds an unbounded thread pool.

  Request Parameter | Type | Required | Expressions Allowed | Default value | Description
  --- | --- | --- | --- | --- | ---
  keepalive-time | OBJECT | false | false |  | Used to specify the amount of time that pool threads should be kept running when idle; if not specified, threads will run until the executor is shut down.
  max-threads | INT | true | true |  | The maximum thread pool size. Note this should always be greater than 3. Two threads are reserved to ensure partition jobs can execute as expected.
  thread-factory | STRING | false | false |  | Specifies the name of a specific thread factory to use to create worker threads. If not defined an appropriate default thread factory will be used.

  Raw DMR model |
      {
          "operation-name" : "add",
          "description" : "Adds an unbounded thread pool.",
          "request-properties" : {
              "keepalive-time" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "OBJECT"
                  },
                  "description" : "Used to specify the amount of time that pool threads should be kept running when idle; if not specified, threads will run until the executor is shut down.",
                  "expressions-allowed" : false,
                  "required" : false,
                  "nillable" : true,
                  "stability" : "default",
                  "value-type" : {
                      "time" : {
                          "type" : {
                              "TYPE_MODEL_VALUE" : "LONG"
                          },
                          "description" : "The time",
                          "expressions-allowed" : true,
                          "required" : true,
                          "nillable" : false,
                          "stability" : "default"
                      },
                      "unit" : {
                          "type" : {
                              "TYPE_MODEL_VALUE" : "STRING"
                          },
                          "description" : "The time unit",
                          "expressions-allowed" : true,
                          "required" : true,
                          "nillable" : false,
                          "allowed" : [
                              "NANOSECONDS",
                              "MICROSECONDS",
                              "MILLISECONDS",
                              "SECONDS",
                              "MINUTES",
                              "HOURS",
                              "DAYS"
                          ],
                          "stability" : "default"
                      }
                  }
              },
              "max-threads" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "INT"
                  },
                  "description" : "The maximum thread pool size. Note this should always be greater than 3. Two threads are reserved to ensure partition jobs can execute as expected.",
                  "expressions-allowed" : true,
                  "required" : true,
                  "nillable" : false,
                  "min" : 0,
                  "max" : 2147483647,
                  "stability" : "default"
              },
              "thread-factory" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "STRING"
                  },
                  "description" : "Specifies the name of a specific thread factory to use to create worker threads. If not defined an appropriate default thread factory will be used.",
                  "expressions-allowed" : false,
                  "required" : false,
                  "nillable" : true,
                  "capability-reference" : "org.wildfly.threads.thread-factory",
                  "min-length" : 1,
                  "max-length" : 2147483647,
                  "stability" : "default"
              }
          },
          "reply-properties" : {},
          "stability" : "default",
          "read-only" : false,
          "runtime-only" : false
      }

- remove - Removes an unbounded thread pool.

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

## Galleon Features

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

- subsystem.batch-jberet.thread-pool

      <feature spec="subsystem.batch-jberet.thread-pool">
        <param name="thread-pool" value="{resource name}"/>
        <param name="keepalive-time" value="{value}"/>
        <param name="max-threads" value="{value}"/>
        <param name="thread-factory" value="{value}"/>
      <feature/>