Redigera

Dela via


ObjectPoolMonitorBridge Class

Definition

ObjectPoolMonitor report metrics for ObjectPool, which are based on object count. BlockPoolMonitor report metrics for BlockPool, which are based on memory size. These two monitor converge in orleans cache infrastructure, where ObjectPool is used as block pool to allocate memory, where each object represent a block of memory which has a size. ObjectPoolMonitorBridge is the bridge between these two monitors in cache infrastructure. When ObjectPoolMonitor is reporting a metric, the user configured BlockPoolMonitor will call its counterpart method and reporting metric based on the math: memoryInByte = objectCount*objectSizeInByte

public class ObjectPoolMonitorBridge : Orleans.Providers.Streams.Common.IObjectPoolMonitor
type ObjectPoolMonitorBridge = class
    interface IObjectPoolMonitor
Public Class ObjectPoolMonitorBridge
Implements IObjectPoolMonitor
Inheritance
ObjectPoolMonitorBridge
Implements

Constructors

ObjectPoolMonitorBridge(IBlockPoolMonitor, Int32)

Initializes a new instance of the ObjectPoolMonitorBridge class.

Methods

Report(Int64, Int64, Int64)

Periodically report object pool status, and also call its blockPoolMonitor to report its counter part metrics

TrackObjectAllocated()

Track object allocated event and also call its blcokPoolMonitor to report TrackMemoryAllocatedByCache

TrackObjectReleased()

Track object released, and also call its blockPoolMonitor to report TrackMemoryReleasedFromCache

Applies to