Skip to content

IQueueCache Methods

AddToCache(IList<IBatchContainer>)

abstract
public abstract void AddToCache(IList<IBatchContainer> messages)
Adds messages to the cache.

Parameters

messagesIList<IBatchContainer>
The message batches.

GetCacheCursor(StreamId, StreamSequenceToken)

abstract
public abstract 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.

IsUnderPressure

abstract
public abstract 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>)

abstract
public abstract 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.

UpdateDeliveryProgress(StreamSequenceToken?, DateTime)

virtual
View source
public virtual void UpdateDeliveryProgress(StreamSequenceToken? earliestSubscriptionToken, DateTime utcNow)
Updates the cache with the current delivery progress of all active subscriptions.

Parameters

earliestSubscriptionTokenStreamSequenceToken?
The earliest last processed sequence token across registered subscriptions. A null value indicates that there are no active subscriptions. The token is only valid for the duration of the call and must not be stored.
utcNowDateTime
The current UTC time.