# JournalReplayContext Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.journaling/orleans.journaling.journalreplaycontext/)

## GetRequiredCommandCodec(string, TCodec) {#getrequiredcommandcodec-1-string-tcodec-3b7d777d}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.journaling/orleans.journaling.journalreplaycontext/methods/getrequiredcommandcodec-1-string-tcodec-3b7d777d/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Journaling/JournalReplayContext.cs#L47-L55)

```csharp
public TCodec GetRequiredCommandCodec<TCodec>(string entryFormatKey, TCodec writeCommandCodec)
```

Gets the command codec for `entryFormatKey`.

### Parameters

- `entryFormatKey` (`string`): The journal format key for the entry being replayed.
- `writeCommandCodec` (`TCodec`): The command codec for the configured write journal format.

### Returns

The command codec for `entryFormatKey`.

## ResolveState(JournalStreamId) {#resolvestate-orleans-journaling-journalstreamid-eeea657c}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.journaling/orleans.journaling.journalreplaycontext/methods/resolvestate-orleans-journaling-journalstreamid-eeea657c/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Journaling/JournalReplayContext.cs#L35)

```csharp
public IJournaledState ResolveState(JournalStreamId streamId)
```

Resolves the journaled state for `streamId`.

### Parameters

- `streamId` (`JournalStreamId`): The persisted journal stream id.

### Returns

The journaled state for the stream.
