## Attributes (5)

- exhausted-action - Specifies what happens when asking for a connection from a server's pool, and that pool is exhausted.

  Type | STRING
  Default Value | WAIT
  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 | CREATE_NEW EXCEPTION WAIT
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "STRING"
          },
          "description" : "Specifies what happens when asking for a connection from a server's pool, and that pool is exhausted.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "default" : "WAIT",
          "allowed" : [
              "EXCEPTION",
              "WAIT",
              "CREATE_NEW"
          ],
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "resource-services",
          "capability-reference" : null
      }

- max-active - Controls the maximum number of connections per server that are allocated (checked out to client threads, or idle in the pool) at one time. When non-positive, there is no limit to the number of connections per server. When maxActive is reached, the connection pool for that server is said to be exhausted. Value -1 means no limit.

  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
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "INT"
          },
          "description" : "Controls the maximum number of connections per server that are allocated (checked out to client threads, or idle in the pool) at one time. When non-positive, there is no limit to the number of connections per server. When maxActive is reached, the connection pool for that server is said to be exhausted. Value -1 means no limit.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "resource-services",
          "capability-reference" : null
      }

- max-wait - The amount of time in milliseconds to wait for a connection to become available when the exhausted action is ExhaustedAction.WAIT, after which a java.util.NoSuchElementException will be thrown. If a negative value is supplied, the pool will block indefinitely.

  Type | LONG
  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
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "LONG"
          },
          "description" : "The amount of time in milliseconds to wait for a connection to become available when the exhausted action is ExhaustedAction.WAIT, after which a java.util.NoSuchElementException will be thrown. If a negative value is supplied, the pool will block indefinitely.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "unit" : "MILLISECONDS",
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "resource-services",
          "capability-reference" : null
      }

- min-evictable-idle-time - Specifies the minimum amount of time that an connection may sit idle in the pool before it is eligible for eviction due to idle time. When non-positive, no connection will be dropped from the pool due to idle time alone. This setting has no effect unless timeBetweenEvictionRunsMillis > 0.

  Type | LONG
  Default Value | 1800000
  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
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "LONG"
          },
          "description" : "Specifies the minimum amount of time that an connection may sit idle in the pool before it is eligible for eviction due to idle time. When non-positive, no connection will be dropped from the pool due to idle time alone. This setting has no effect unless timeBetweenEvictionRunsMillis > 0.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "default" : 1800000,
          "unit" : "MILLISECONDS",
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "resource-services",
          "capability-reference" : null
      }

- min-idle - Sets a target value for the minimum number of idle connections (per server) that should always be available. If this parameter is set to a positive number and timeBetweenEvictionRunsMillis > 0, each time the idle connection eviction thread runs, it will try to create enough idle instances so that there will be minIdle idle instances available for each server.

  Type | INT
  Default Value | 1
  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" : "INT"
          },
          "description" : "Sets a target value for the minimum number of idle connections (per server) that should always be available. If this parameter is set to a positive number and timeBetweenEvictionRunsMillis > 0, each time the idle connection eviction thread runs, it will try to create enough idle instances so that there will be minIdle idle instances available for each server.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "default" : 1,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "resource-services",
          "capability-reference" : null
      }

## Operations (2)

- add - Adds configuration of the connection pool.

  Request Parameter | Type | Required | Expressions Allowed | Default value | Description
  --- | --- | --- | --- | --- | ---
  exhausted-action | STRING | false | true | WAIT | Specifies what happens when asking for a connection from a server's pool, and that pool is exhausted.
  max-active | INT | false | true |  | Controls the maximum number of connections per server that are allocated (checked out to client threads, or idle in the pool) at one time. When non-positive, there is no limit to the number of connections per server. When maxActive is reached, the connection pool for that server is said to be exhausted. Value -1 means no limit.
  max-wait | LONG | false | true |  | The amount of time in milliseconds to wait for a connection to become available when the exhausted action is ExhaustedAction.WAIT, after which a java.util.NoSuchElementException will be thrown. If a negative value is supplied, the pool will block indefinitely.
  min-evictable-idle-time | LONG | false | true | 1800000 | Specifies the minimum amount of time that an connection may sit idle in the pool before it is eligible for eviction due to idle time. When non-positive, no connection will be dropped from the pool due to idle time alone. This setting has no effect unless timeBetweenEvictionRunsMillis > 0.
  min-idle | INT | false | true | 1 | Sets a target value for the minimum number of idle connections (per server) that should always be available. If this parameter is set to a positive number and timeBetweenEvictionRunsMillis > 0, each time the idle connection eviction thread runs, it will try to create enough idle instances so that there will be minIdle idle instances available for each server.

  Raw DMR model |
      {
          "operation-name" : "add",
          "description" : "Adds configuration of the connection pool.",
          "request-properties" : {
              "exhausted-action" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "STRING"
                  },
                  "description" : "Specifies what happens when asking for a connection from a server's pool, and that pool is exhausted.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : "WAIT",
                  "allowed" : [
                      "EXCEPTION",
                      "WAIT",
                      "CREATE_NEW"
                  ],
                  "stability" : "default"
              },
              "max-active" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "INT"
                  },
                  "description" : "Controls the maximum number of connections per server that are allocated (checked out to client threads, or idle in the pool) at one time. When non-positive, there is no limit to the number of connections per server. When maxActive is reached, the connection pool for that server is said to be exhausted. Value -1 means no limit.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "stability" : "default"
              },
              "max-wait" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "LONG"
                  },
                  "description" : "The amount of time in milliseconds to wait for a connection to become available when the exhausted action is ExhaustedAction.WAIT, after which a java.util.NoSuchElementException will be thrown. If a negative value is supplied, the pool will block indefinitely.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "unit" : "MILLISECONDS",
                  "stability" : "default"
              },
              "min-evictable-idle-time" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "LONG"
                  },
                  "description" : "Specifies the minimum amount of time that an connection may sit idle in the pool before it is eligible for eviction due to idle time. When non-positive, no connection will be dropped from the pool due to idle time alone. This setting has no effect unless timeBetweenEvictionRunsMillis > 0.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : 1800000,
                  "unit" : "MILLISECONDS",
                  "stability" : "default"
              },
              "min-idle" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "INT"
                  },
                  "description" : "Sets a target value for the minimum number of idle connections (per server) that should always be available. If this parameter is set to a positive number and timeBetweenEvictionRunsMillis > 0, each time the idle connection eviction thread runs, it will try to create enough idle instances so that there will be minIdle idle instances available for each server.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : 1,
                  "stability" : "default"
              }
          },
          "reply-properties" : {},
          "stability" : "default",
          "read-only" : false,
          "runtime-only" : false
      }

- remove - Removes configuration of the connection pool.

  Raw DMR model |
      {
          "operation-name" : "remove",
          "description" : "Removes configuration of the connection pool.",
          "request-properties" : {},
          "reply-properties" : {},
          "stability" : "default",
          "read-only" : false,
          "runtime-only" : false
      }

## Galleon Features

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

- subsystem.infinispan.remote-cache-container.component.connection-pool

      <feature spec="subsystem.infinispan.remote-cache-container.component.connection-pool">
        <param name="remote-cache-container" value="{resource name}"/>
        <param name="exhausted-action" value="{value}"/>
        <param name="max-active" value="{value}"/>
        <param name="max-wait" value="{value}"/>
        <param name="min-evictable-idle-time" value="{value}"/>
        <param name="min-idle" value="{value}"/>
      <feature/>