## Provided Capabilities (1)

Name | Dynamic | Other provider points
--- | --- | ---
org.wildfly.undertow.byte-buffer-pool | true | /subsystem=io/buffer-pool=*

## Attributes (5)

- buffer-size - The size of the buffer

  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? | all-services
  Min | 0
  Max | 2147483647
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "INT"
          },
          "description" : "The size of the buffer",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "min" : 0,
          "max" : 2147483647,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "all-services",
          "capability-reference" : null
      }

- direct - If this is true the buffer pool will use direct buffers, this is recommended for best performance

  Type | BOOLEAN
  Is the attribute nillable? | true
  Does the attribute allow expression? | 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" : "BOOLEAN"
          },
          "description" : "If this is true the buffer pool will use direct buffers, this is recommended for best performance",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "all-services",
          "capability-reference" : null
      }

- leak-detection-percent - The percentage of buffers that will be allocated with a leak detector. This should only be larger than zero if you are experiencing issues with buffers leaking.

  Type | INT
  Default Value | 0
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | all-services
  Min | 0
  Max | 2147483647
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "INT"
          },
          "description" : "The percentage of buffers that will be allocated with a leak detector. This should only be larger than zero if you are experiencing issues with buffers leaking.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "default" : 0,
          "min" : 0,
          "max" : 2147483647,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "all-services",
          "capability-reference" : null
      }

- max-pool-size - The maximum amount of buffers to keep in the pool. If more buffers are required at runtime they will be allocated dynamically. Setting this to zero effectively disables pooling.

  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? | all-services
  Min | 0
  Max | 2147483647
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "INT"
          },
          "description" : "The maximum amount of buffers to keep in the pool. If more buffers are required at runtime they will be allocated dynamically. Setting this to zero effectively disables pooling.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "min" : 0,
          "max" : 2147483647,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "all-services",
          "capability-reference" : null
      }

- thread-local-cache-size - The maximum number of buffers to cache on each thread. The actual number may be lower depending on the calculated usage pattern.

  Type | INT
  Default Value | 12
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | all-services
  Min | 0
  Max | 2147483647
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "INT"
          },
          "description" : "The maximum number of buffers to cache on each thread. The actual number may be lower depending on the calculated usage pattern.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "default" : 12,
          "min" : 0,
          "max" : 2147483647,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "all-services",
          "capability-reference" : null
      }

## Operations (2)

- add - Adds a new byte buffer pool

  Request Parameter | Type | Required | Expressions Allowed | Default value | Description
  --- | --- | --- | --- | --- | ---
  buffer-size | INT | false | true |  | The size of the buffer
  direct | BOOLEAN | false | true |  | If this is true the buffer pool will use direct buffers, this is recommended for best performance
  leak-detection-percent | INT | false | true | 0 | The percentage of buffers that will be allocated with a leak detector. This should only be larger than zero if you are experiencing issues with buffers leaking.
  max-pool-size | INT | false | true |  | The maximum amount of buffers to keep in the pool. If more buffers are required at runtime they will be allocated dynamically. Setting this to zero effectively disables pooling.
  thread-local-cache-size | INT | false | true | 12 | The maximum number of buffers to cache on each thread. The actual number may be lower depending on the calculated usage pattern.

  Raw DMR model |
      {
          "operation-name" : "add",
          "description" : "Adds a new byte buffer pool",
          "request-properties" : {
              "buffer-size" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "INT"
                  },
                  "description" : "The size of the buffer",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "min" : 0,
                  "max" : 2147483647,
                  "stability" : "default"
              },
              "direct" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "BOOLEAN"
                  },
                  "description" : "If this is true the buffer pool will use direct buffers, this is recommended for best performance",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "stability" : "default"
              },
              "leak-detection-percent" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "INT"
                  },
                  "description" : "The percentage of buffers that will be allocated with a leak detector. This should only be larger than zero if you are experiencing issues with buffers leaking.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : 0,
                  "min" : 0,
                  "max" : 2147483647,
                  "stability" : "default"
              },
              "max-pool-size" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "INT"
                  },
                  "description" : "The maximum amount of buffers to keep in the pool. If more buffers are required at runtime they will be allocated dynamically. Setting this to zero effectively disables pooling.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "min" : 0,
                  "max" : 2147483647,
                  "stability" : "default"
              },
              "thread-local-cache-size" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "INT"
                  },
                  "description" : "The maximum number of buffers to cache on each thread. The actual number may be lower depending on the calculated usage pattern.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : 12,
                  "min" : 0,
                  "max" : 2147483647,
                  "stability" : "default"
              }
          },
          "reply-properties" : {},
          "stability" : "default",
          "read-only" : false,
          "runtime-only" : false
      }

- remove - Removes a byte buffer pool

  Raw DMR model |
      {
          "operation-name" : "remove",
          "description" : "Removes a byte buffer 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.undertow.byte-buffer-pool

      <feature spec="subsystem.undertow.byte-buffer-pool">
        <param name="byte-buffer-pool" value="{resource name}"/>
        <param name="buffer-size" value="{value}"/>
        <param name="direct" value="{value}"/>
        <param name="leak-detection-percent" value="{value}"/>
        <param name="max-pool-size" value="{value}"/>
        <param name="thread-local-cache-size" value="{value}"/>
      <feature/>