# StreamCheckpointGrain Methods

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

## Load(CancellationToken) {#load-system-threading-cancellationtoken-b6573561}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.streamcheckpointgrain/methods/load-system-threading-cancellationtoken-b6573561/)

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

```csharp
public ValueTask<string> Load(CancellationToken cancellationToken)
```

Loads the checkpoint.

### Parameters

- `cancellationToken` (`CancellationToken`): The cancellation token.

### Returns

The checkpoint.

## Update(string, string, CancellationToken) {#update-string-string-system-threading-cancellationtoken-3906538f}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.streamcheckpointgrain/methods/update-string-string-system-threading-cancellationtoken-3906538f/)

[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.
