# Cloud Bigtable V2 Client - Class SessionPoolConfiguration (2.25.0)

2.25.0 (latest) 2.24.0 2.23.0 2.22.0 2.21.1 2.20.2 2.19.2 2.18.0 2.17.1 2.16.0 2.15.0 2.14.0 2.13.0 2.12.0 2.11.1 2.9.1 2.8.0 2.7.0 2.6.3 2.5.0 2.4.0 2.3.0 2.2.1 2.1.0 2.0.1 1.32.1 1.31.1 1.30.0 1.29.2 1.28.3 1.27.0 1.26.2 1.25.0 1.24.1 1.23.0 1.22.2 1.21.1 1.20.3 Reference documentation and code samples for the Cloud Bigtable V2 Client class SessionPoolConfiguration.

Configuration for the session pools. Session pools are tied to a scope
like a table, an app profile, and a permission.

Generated from protobuf message `google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration`

## Namespace

Google \\ Cloud \\ Bigtable \\ V2 \\ SessionClientConfiguration

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ headroom` | `float` Fraction of idle sessions to keep in order to manage an increase in requests-in-flight. For example, a headroom of 0.5 will keep enough sessions to deal with a 50% increase in QPS. |
| `↳ min_session_count` | `int` The minimum number of sessions for a given scope. |
| `↳ max_session_count` | `int` The maximum number of sessions for a given scope. |
| `↳ new_session_queue_length` | `int` Number of vRPCs that can be queued per starting session. |
| `↳ new_session_creation_budget` | `int` How many concurrent session establishments are allowed. The client will hold onto a count against this budget whenever it is establishing a new session, and release that count once the session is successfully established or failed to establish. |
| `↳ new_session_creation_penalty` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` How long to penalize the creation budget for a failed session creation attempt. |
| `↳ consecutive_session_failure_threshold` | `int` A threshold for cancelling all pending vRPCs based on how many consecutive session establishment errors have been observed. The client will eagerly cancel queued vRPCs after this threshold is met to avoid them waiting their entire deadlines before terminating (while waiting for any session to establish to actually send the vRPC). |
| `↳ load_balancing_options` | `https://docs.cloud.google.com/php/docs/reference/cloud-bigtable/latest/V2.LoadBalancingOptions` How to balance vRPC load over connections to AFEs. Set only if session_load \> 0. |

### getHeadroom

Fraction of idle sessions to keep in order to manage an increase in
requests-in-flight. For example, a headroom of 0.5 will keep enough
sessions to deal with a 50% increase in QPS.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setHeadroom

Fraction of idle sessions to keep in order to manage an increase in
requests-in-flight. For example, a headroom of 0.5 will keep enough
sessions to deal with a 50% increase in QPS.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `float` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMinSessionCount

The minimum number of sessions for a given scope.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setMinSessionCount

The minimum number of sessions for a given scope.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMaxSessionCount

The maximum number of sessions for a given scope.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setMaxSessionCount

The maximum number of sessions for a given scope.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getNewSessionQueueLength

Number of vRPCs that can be queued per starting session.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setNewSessionQueueLength

Number of vRPCs that can be queued per starting session.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getNewSessionCreationBudget

How many concurrent session establishments are allowed. The client will
hold onto a count against this budget whenever it is establishing a new
session, and release that count once the session is successfully
established or failed to establish.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setNewSessionCreationBudget

How many concurrent session establishments are allowed. The client will
hold onto a count against this budget whenever it is establishing a new
session, and release that count once the session is successfully
established or failed to establish.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getNewSessionCreationPenalty

How long to penalize the creation budget for a failed session creation
attempt.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasNewSessionCreationPenalty

### clearNewSessionCreationPenalty

### setNewSessionCreationPenalty

How long to penalize the creation budget for a failed session creation
attempt.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getConsecutiveSessionFailureThreshold

A threshold for cancelling all pending vRPCs based on how many
consecutive session establishment errors have been observed. The client
will eagerly cancel queued vRPCs after this threshold is met to avoid
them waiting their entire deadlines before terminating (while waiting for
any session to establish to actually send the vRPC).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setConsecutiveSessionFailureThreshold

A threshold for cancelling all pending vRPCs based on how many
consecutive session establishment errors have been observed. The client
will eagerly cancel queued vRPCs after this threshold is met to avoid
them waiting their entire deadlines before terminating (while waiting for
any session to establish to actually send the vRPC).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLoadBalancingOptions

How to balance vRPC load over connections to AFEs.

Set only if session_load \> 0.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-bigtable/latest/V2.LoadBalancingOptions|null` |   |

### hasLoadBalancingOptions

### clearLoadBalancingOptions

### setLoadBalancingOptions

How to balance vRPC load over connections to AFEs.

Set only if session_load \> 0.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-bigtable/latest/V2.LoadBalancingOptions` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |