Skip to content

SimpleQueueCache Methods

A queue cache that keeps items in memory.

GetCacheCursor(StreamId, StreamSequenceToken)

virtual
View source
public virtual IQueueCacheCursor GetCacheCursor(StreamId streamId, StreamSequenceToken token)
Acquire a stream message cursor. This can be used to retrieve messages from the cache starting at the location indicated by the provided token.

Parameters

streamIdStreamId
The stream identifier.
tokenStreamSequenceToken
The token.

Returns

The queue cache cursor.

GetMaxAddCount

View source
public int GetMaxAddCount()
Gets the maximum number of items that can be added.

Returns

The maximum number of items that can be added.

IsUnderPressure

virtual
View source
public virtual bool IsUnderPressure()
Returns true if this cache is under pressure, false otherwise.

Returns

true if this cache is under pressure; otherwise, false.

TryPurgeFromCache(IList<IBatchContainer>)

virtual
View source
public virtual bool TryPurgeFromCache(out IList<IBatchContainer> purgedItems)
Requests that the cache purge any items that can be purged.

Parameters

purgedItemsIList<IBatchContainer>
The purged items.

Returns

true if items were successfully purged from the cache., false otherwise.