# IStreamCheckpointStore.Update(string, string, CancellationToken)

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

```csharp
public abstract ValueTask<StreamCheckpointStoreState> Update(string checkpoint, string expectedVersion, CancellationToken cancellationToken)
```

Updates the checkpoint if `expectedVersion` matches the persisted version.

### Parameters

- `checkpoint` (`string`): The checkpoint to persist.
- `expectedVersion` (`string`): The expected persisted version.
- `cancellationToken` (`CancellationToken`): The cancellation token.

### Returns

The persisted state after the update attempt. If the expected version did not match, the returned state contains the conflicting persisted checkpoint and version.
