Skip to content

EventHubQueueCacheFactory Methods

Factory class to configure and create IEventHubQueueCache

AddCachePressureMonitors(IEventHubQueueCache, EventHubStreamCachePressureOptions, ILogger)

virtual
View source
protected virtual void AddCachePressureMonitors(IEventHubQueueCache cache, EventHubStreamCachePressureOptions providerOptions, ILogger cacheLogger)
Function used to configure cache pressure monitors for EventHubQueueCache. User can override this function to provide more customization on cache pressure monitors

Parameters

cacheIEventHubQueueCache
providerOptionsEventHubStreamCachePressureOptions
cacheLoggerILogger

CreateBufferPool(StreamStatisticOptions, ILoggerFactory, EventHubMonitorAggregationDimensions, string)

virtual
View source
protected virtual IObjectPool<FixedSizeBuffer> CreateBufferPool(StreamStatisticOptions statisticOptions, ILoggerFactory loggerFactory, EventHubMonitorAggregationDimensions sharedDimensions, out string blockPoolId)
Function used to configure BufferPool for EventHubQueueCache. User can override this function to provide more customization on BufferPool creation

Parameters

statisticOptionsStreamStatisticOptions
loggerFactoryILoggerFactory
sharedDimensionsEventHubMonitorAggregationDimensions
blockPoolIdstring

CreateCache(string, IEventHubDataAdapter, StreamStatisticOptions, StreamCacheEvictionOptions, IStreamQueueCheckpointer<string>, ILoggerFactory, IObjectPool<FixedSizeBuffer>, string, TimePurgePredicate, EventHubMonitorAggregationDimensions)

virtual
View source
protected virtual IEventHubQueueCache CreateCache(string partition, IEventHubDataAdapter dataAdatper, StreamStatisticOptions statisticOptions, StreamCacheEvictionOptions streamCacheEvictionOptions, IStreamQueueCheckpointer<string> checkpointer, ILoggerFactory loggerFactory, IObjectPool<FixedSizeBuffer> bufferPool, string blockPoolId, TimePurgePredicate timePurge, EventHubMonitorAggregationDimensions sharedDimensions)
Default function to be called to create an EventhubQueueCache in IEventHubQueueCacheFactory.CreateCache method. User can override this method to add more customization.

Parameters

partitionstring
dataAdatperIEventHubDataAdapter
statisticOptionsStreamStatisticOptions
streamCacheEvictionOptionsStreamCacheEvictionOptions
checkpointerIStreamQueueCheckpointer<string>
loggerFactoryILoggerFactory
bufferPoolIObjectPool<FixedSizeBuffer>
blockPoolIdstring
timePurgeTimePurgePredicate
sharedDimensionsEventHubMonitorAggregationDimensions

CreateCache(string, IStreamQueueCheckpointer<string>, ILoggerFactory)

View source
public IEventHubQueueCache CreateCache(string partition, IStreamQueueCheckpointer<string> checkpointer, ILoggerFactory loggerFactory)
Function which create an EventHubQueueCache, which by default will configure the EventHubQueueCache using configuration in CreateBufferPool function and AddCachePressureMonitors function.

Parameters

partitionstring
checkpointerIStreamQueueCheckpointer<string>
loggerFactoryILoggerFactory