-
Notifications
You must be signed in to change notification settings - Fork 2k
/
IObjectPoolMonitor.cs
32 lines (29 loc) · 1.05 KB
/
IObjectPoolMonitor.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Orleans.Providers.Streams.Common
{
/// <summary>
/// Monitor track object pool related metrics
/// </summary>
public interface IObjectPoolMonitor
{
/// <summary>
/// Track every time when an object is allocated
/// </summary>
void TrackObjectAllocated();
/// <summary>
/// Track every time an object was released back to the pool
/// </summary>
void TrackObjectReleased();
/// <summary>
/// Periodically report object pool status
/// </summary>
/// <param name="totalObjects">Total size of object pool</param>
/// <param name="availableObjects">Count for objects in the pool which is available for allocating</param>
/// <param name="claimedObjects">Count for objects which are claimed, hence not available</param>
void Report(long totalObjects, long availableObjects, long claimedObjects);
}
}