Class DataBufferPoolTracer
A data buffer pool tracer.
Inheritance
System.Object
DataBufferPoolTracer
Implements
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class DataBufferPoolTracer : object, IDataBufferPool
Constructors
DataBufferPoolTracer(String, DataBufferPool)
Initializes a new instance of the Data
Declaration
public DataBufferPoolTracer(string tag, DataBufferPool pool)
Parameters
Type | Name | Description |
---|---|---|
System. |
tag | |
Data |
pool |
Properties
Pool
Gets the underlying pool.
Declaration
public DataBufferPool Pool { get; }
Property Value
Type | Description |
---|---|
Data |
Statistics
Gets the traced usage statistics.
Declaration
public PoolStatistics Statistics { get; }
Property Value
Type | Description |
---|---|
Pool |
Tag
Gets the tag that identifies requests to the underlying pool.
Declaration
public string Tag { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
Take(Int32)
Takes a buffer from the pool.
Declaration
public DataBuffer Take(int size)
Parameters
Type | Name | Description |
---|---|---|
System. |
size | The number of bytes needed. |
Returns
Type | Description |
---|---|
Data |
Take(Int32, Boolean)
Takes a buffer from the pool.
Declaration
public DataBuffer Take(int size, bool littleEndian)
Parameters
Type | Name | Description |
---|---|---|
System. |
size | The number of bytes needed. |
System. |
littleEndian | Whether the data buffer should be little-endian. |
Returns
Type | Description |
---|---|
Data |
Take(Int32, Boolean, Boolean)
Takes a buffer from the pool.
Declaration
public DataBuffer Take(int size, bool littleEndian, bool clearBytes)
Parameters
Type | Name | Description |
---|---|---|
System. |
size | The number of bytes needed. |
System. |
littleEndian | Whether the data buffer should be little-endian. |
System. |
clearBytes | Whether to clear the data buffer. |
Returns
Type | Description |
---|---|
Data |