Edytuj

Udostępnij za pośrednictwem


EventHubQueueCache<TCachedMessage> Class

Definition

EventHub queue cache that allows developers to provide their own cached data structure.

public abstract class EventHubQueueCache<TCachedMessage> : IDisposable, Orleans.ServiceBus.Providers.IEventHubQueueCache, Orleans.Streams.IQueueFlowController where TCachedMessage : struct
type EventHubQueueCache<'CachedMessage (requires 'CachedMessage : struct)> = class
    interface IEventHubQueueCache
    interface IQueueFlowController
    interface IDisposable
Public MustInherit Class EventHubQueueCache(Of TCachedMessage)
Implements IDisposable, IEventHubQueueCache, IQueueFlowController

Type Parameters

TCachedMessage
Inheritance
EventHubQueueCache<TCachedMessage>
Derived
Implements

Constructors

EventHubQueueCache<TCachedMessage>(Int32, IStreamQueueCheckpointer<String>, ICacheDataAdapter<EventData,TCachedMessage>, ICacheDataComparer<TCachedMessage>, ILogger, IEvictionStrategy<TCachedMessage>, ICacheMonitor, Nullable<TimeSpan>)

Construct EventHub queue cache.

EventHubQueueCache<TCachedMessage>(Int32, IStreamQueueCheckpointer<String>, ICacheDataAdapter<EventData,TCachedMessage>, ICacheDataComparer<TCachedMessage>, Logger, IEvictionStrategy<TCachedMessage>, ICacheMonitor, Nullable<TimeSpan>)

Construct EventHub queue cache.

Fields

cache

Underlying message cache implementation

defaultMaxAddCount

Default max number of items that can be added to the cache between purge calls

Properties

Checkpointer

Logic used to store queue position

Methods

Add(List<EventData>, DateTime)

Add a list of EventHub EventData to the cache.

Add(List<EventData>, DateTime)

Add a list of EventHub EventData to the cache.

AddCachePressureMonitor(ICachePressureMonitor)

Add cache pressure monitor to the cache's back pressure algorithm

Dispose()

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

GetCursor(IStreamIdentity, StreamSequenceToken)

Get a cursor into the cache to read events from a stream.

GetMaxAddCount()

The limit of the maximum number of items that can be added

GetOffset(TCachedMessage)

Get offset from cached message. Left to derived class, as only it knows how to get this from the cached message.

OnPurge(Nullable<TCachedMessage>, Nullable<TCachedMessage>)

Handles cache purge signals

SignalPurge()

Send purge signal to the cache, the cache will perform a time based purge on its cached messages

TryCalculateCachePressureContribution(StreamSequenceToken, Double)

cachePressureContribution should be a double between 0-1, indicating how much danger the item is of being removed from the cache. 0 indicating no danger, 1 indicating removal is imminent.

TryGetNextMessage(Object, IBatchContainer)

Try to get the next message in the cache for the provided cursor.

Applies to