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