# Cloud Bigtable V2 Client - Class CloseStream (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 CloseStream.

A message indicating that the client should stop reading from the stream.

If status is OK and `continuation_tokens` \& `new_partitions` are empty, the
stream has finished (for example if there was an `end_time` specified).
If `continuation_tokens` \& `new_partitions` are present, then a change in
partitioning requires the client to open a new stream for each token to
resume reading. Example:
\[B, D) ends
\|
v
new_partitions: \[A, C) \[C, E)
continuation_tokens.partitions: \[B,C) \[C,D)
\^---\^ \^---\^
\^ \^
\| \|
\| StreamContinuationToken 2
\|
StreamContinuationToken 1
To read the new partition \[A,C), supply the continuation tokens whose
ranges cover the new partition, for example ContinuationToken\[A,B) \&
ContinuationToken\[B,C).

Generated from protobuf message `google.bigtable.v2.ReadChangeStreamResponse.CloseStream`

## Namespace

Google \\ Cloud \\ Bigtable \\ V2 \\ ReadChangeStreamResponse

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ status` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` The status of the stream. |
| `↳ continuation_tokens` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-bigtable/latest/V2.StreamContinuationToken>` If non-empty, contains the information needed to resume reading their associated partitions. |
| `↳ new_partitions` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-bigtable/latest/V2.StreamPartition>` If non-empty, contains the new partitions to start reading from, which are related to but not necessarily identical to the partitions for the above `continuation_tokens`. |

### getStatus

The status of the stream.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html|null` |   |

### hasStatus

### clearStatus

### setStatus

The status of the stream.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` |

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

### getContinuationTokens

If non-empty, contains the information needed to resume reading their
associated partitions.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-bigtable/latest/V2.StreamContinuationToken>` |   |

### setContinuationTokens

If non-empty, contains the information needed to resume reading their
associated partitions.

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

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

### getNewPartitions

If non-empty, contains the new partitions to start reading from, which
are related to but not necessarily identical to the partitions for the
above `continuation_tokens`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-bigtable/latest/V2.StreamPartition>` |   |

### setNewPartitions

If non-empty, contains the new partitions to start reading from, which
are related to but not necessarily identical to the partitions for the
above `continuation_tokens`.

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

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