# FixedSizeBuffer Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.common.fixedsizebuffer/)

## OnResetState {#onresetstate-5f71f365}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.common.fixedsizebuffer/methods/onresetstate-5f71f365/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/Common/PooledCache/FixedSizeBuffer.cs#L62-L63)

```csharp
public override void OnResetState()
```

Notifies the object that it has been purged, so it can reset itself to the state of a newly allocated object.

## TryGetSegment(int, ArraySegment&lt;byte&gt;) {#trygetsegment-int-out-system-arraysegment-byte-c8cd016f}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.common.fixedsizebuffer/methods/trygetsegment-int-out-system-arraysegment-byte-c8cd016f/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/Common/PooledCache/FixedSizeBuffer.cs#L49-L56)

```csharp
public bool TryGetSegment(int size, out ArraySegment<byte> value)
```

Try to get a segment with a buffer of the specified size from this block. Fail if there is not enough space available

### Parameters

- `size` (`int`): The size.
- `value` (`ArraySegment<byte>`): The segment.

### Returns

`true` if the segment was retrieved; otherwise `false`.
