Interface IBufferPool
An interface used to acquire/release recyclable chunks of bytes to be reused without need to triggering GC.
Namespace: Akka.IO.Buffers
Assembly: Akka.dll
Syntax
public interface IBufferPool
Methods
| Improve this Doc View SourceDiagnostics()
Declaration
BufferPoolInfo Diagnostics()
Returns
Type | Description |
---|---|
BufferPoolInfo |
Release(ArraySegment<Byte>)
Releases a single byte buffer for further use.
Declaration
void Release(ArraySegment<byte> buf)
Parameters
Type | Name | Description |
---|---|---|
ArraySegment<Byte> | buf |
Release(IEnumerable<ArraySegment<Byte>>)
Releases a collection of previously allocated byte buffers for further use.
Declaration
void Release(IEnumerable<ArraySegment<byte>> buf)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<ArraySegment<Byte>> | buf |
Rent()
Rents a byte buffer representing a single continuous block of memory. Size of byte buffer is dependent from the implementation. Once rent, byte buffers are expected to be released using Release(ArraySegment<Byte>) method.
Declaration
ArraySegment<byte> Rent()
Returns
Type | Description |
---|---|
ArraySegment<Byte> |
Rent(Int32)
Rents a sequence of byte buffers representing (potentially non-continuous) range of memory
that is big enough to fit the minimumSize
requested. Once rent, byte
buffers are expected to be released using Release(ArraySegment<Byte>)
method.
Declaration
IEnumerable<ArraySegment<byte>> Rent(int minimumSize)
Parameters
Type | Name | Description |
---|---|---|
Int32 | minimumSize | Minimum size in bytes, that returned collection of byte buffers must be able to fit. |
Returns
Type | Description |
---|---|
IEnumerable<ArraySegment<Byte>> |