# SimpleQueueCacheCursor Methods

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

## Dispose {#dispose-35783d3d}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.common.simplequeuecachecursor/methods/dispose-35783d3d/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/Common/SimpleCache/SimpleQueueCacheCursor.cs#L123-L124)

```csharp
public void Dispose()
```

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

## GetCurrent(Exception) {#getcurrent-out-system-exception-c8da7308}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.common.simplequeuecachecursor/methods/getcurrent-out-system-exception-c8da7308/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/Common/SimpleCache/SimpleQueueCacheCursor.cs#L68-L71)

```csharp
public virtual IBatchContainer GetCurrent(out Exception exception)
```

Get the current value.

### Parameters

- `exception` (`Exception`): The resulting exception.

### Returns

Returns the current batch container. If null then the stream has completed or there was a stream error. If there was a stream error, an error exception will be provided in the output.

## MoveNext {#movenext-a4595f95}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.common.simplequeuecachecursor/methods/movenext-a4595f95/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/Common/SimpleCache/SimpleQueueCacheCursor.cs#L77-L93)

```csharp
public virtual bool MoveNext()
```

Move to next message in the stream. If it returns false, there are no more messages. The enumerator is still valid however and can be called again when more data has come in on this stream.

### Returns

`true` if there are more items, `false` otherwise

## RecordDeliveryFailure {#recorddeliveryfailure-6bc528c5}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.common.simplequeuecachecursor/methods/recorddeliveryfailure-6bc528c5/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/Common/SimpleCache/SimpleQueueCacheCursor.cs#L108-L112)

```csharp
public void RecordDeliveryFailure()
```

Records that delivery of the current event has failed

## Refresh(StreamSequenceToken) {#refresh-orleans-streams-streamsequencetoken-4608dbce}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.common.simplequeuecachecursor/methods/refresh-orleans-streams-streamsequencetoken-4608dbce/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/Common/SimpleCache/SimpleQueueCacheCursor.cs#L99-L103)

```csharp
public virtual void Refresh(StreamSequenceToken sequenceToken)
```

Refreshes the cache cursor. Called when new data is added into a cache.

### Parameters

- `sequenceToken` (`StreamSequenceToken`): The token.

## ToString {#tostring-46fed6f1}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.common.simplequeuecachecursor/methods/tostring-46fed6f1/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/Common/SimpleCache/SimpleQueueCacheCursor.cs#L142)

```csharp
public override string ToString()
```

Returns a string that represents the current object.

### Returns

A string that represents the current object.
