# StreamCheckpointGrain.Update(string, string, CancellationToken)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.streamcheckpointgrain/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.streamcheckpointgrain/methods/)

[Source](https://github.com/dotnet/orleans/blob/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/Orleans.Streaming/Checkpointers/StreamCheckpointGrain.cs#L38-L57)

```csharp
public ValueTask<string> Update(string offset, string expectedCheckpoint, CancellationToken cancellationToken)
```

Updates the checkpoint if the persisted value matches the expected value.

### Parameters

- `offset` (`string`): The offset.
- `expectedCheckpoint` (`string`): The expected persisted checkpoint.
- `cancellationToken` (`CancellationToken`): The cancellation token.

### Returns

The persisted checkpoint after the update attempt.
