Proton DotNet
|
An buffer allocator instance that creates heap based buffer objects. More...
Public Member Functions | |
IProtonBuffer | OutputBuffer (long initialCapacity) |
Create a new output IProtonBuffer instance with the given initial capacity and the maximum capacity should be that of the underlying buffer implementations limit. The buffer implementation should support growing the buffer on an as needed basis to allow writes without the user needing to code extra capacity and buffer reallocation checks. | |
IProtonBuffer | OutputBuffer (long initialCapacity, long maxCapacity) |
Create a new output IProtonBuffer instance with the given initial capacity and the maximum capacity should that of the value specified by the caller. | |
IProtonBuffer | Allocate () |
Create a new IProtonBuffer instance with default initial capacity. The buffer implementation should support growing the buffer on an as needed basis to allow writes without the user needing to code extra capacity and buffer reallocation checks. | |
IProtonBuffer | Allocate (long initialCapacity) |
Create a new IProtonBuffer instance with the given initial capacity and the maximum capacity should be that of the underlying buffer implementations limit. | |
IProtonBuffer | Allocate (long initialCapacity, long maxCapacity) |
Create a new IProtonBuffer instance with the given initial capacity and the maximum capacity should that of the value specified by the caller. | |
IProtonBuffer | Wrap (byte[] buffer) |
Create a new IProtonBuffer that wraps the given byte array. | |
IProtonBuffer | Wrap (byte[] buffer, int offset, int length) |
Create a new IProtonBuffer that wraps the given portion of the byte array. | |
Static Public Attributes | |
static readonly ProtonByteBufferAllocator | Instance = new() |
An buffer allocator instance that creates heap based buffer objects.
|
inline |
Create a new IProtonBuffer instance with default initial capacity. The buffer implementation should support growing the buffer on an as needed basis to allow writes without the user needing to code extra capacity and buffer reallocation checks.
It is not recommended that these buffers be backed by a pooled resource as there is no defined release point within the buffer API and if used by an AMQP engine they could be lost as buffers are copied or aggregated together.
Implements Apache.Qpid.Proton.Buffer.IProtonBufferAllocator.
|
inline |
Create a new IProtonBuffer instance with the given initial capacity and the maximum capacity should be that of the underlying buffer implementations limit.
It is not recommended that these buffers be backed by a pooled resource as there is no defined release point within the buffer API and if used by an AMQP engine they could be lost as buffers are copied or aggregated together.
initialCapacity | The initial capacity to use when creating the buffer |
Implements Apache.Qpid.Proton.Buffer.IProtonBufferAllocator.
|
inline |
Create a new IProtonBuffer instance with the given initial capacity and the maximum capacity should that of the value specified by the caller.
It is not recommended that these buffers be backed by a pooled resource as there is no defined release point within the buffer API and if used by an AMQP engine they could be lost as buffers are copied or aggregated together.
initialCapacity | The initial capacity to use when creating the buffer |
maxCapacity | The maximum capacity limit for the newly created buffer |
Implements Apache.Qpid.Proton.Buffer.IProtonBufferAllocator.
|
inline |
Create a new output IProtonBuffer instance with the given initial capacity and the maximum capacity should be that of the underlying buffer implementations limit. The buffer implementation should support growing the buffer on an as needed basis to allow writes without the user needing to code extra capacity and buffer reallocation checks.
The returned buffer will be used for frame output from the Proton engine and can be a pooled buffer which the IO handler will then need to release once the buffer has been written.
initialCapacity | The initial capacity to use when creating the buffer |
Implements Apache.Qpid.Proton.Buffer.IProtonBufferAllocator.
|
inline |
Create a new output IProtonBuffer instance with the given initial capacity and the maximum capacity should that of the value specified by the caller.
The returned buffer will be used for frame output from the Proton engine and can be a pooled buffer which the IO handler will then need to release once the buffer has been written.
initialCapacity | The initial capacity to use when creating the buffer |
maxCapacity | The maximum capacity limit for the newly created buffer |
Implements Apache.Qpid.Proton.Buffer.IProtonBufferAllocator.
|
inline |
Create a new IProtonBuffer that wraps the given byte array.
The capacity and maximum capacity for the resulting ProtonBuffer should equal to the length of the wrapped array and the returned array offset is zero.
array | The byte array that will be wrapped |
Implements Apache.Qpid.Proton.Buffer.IProtonBufferAllocator.
|
inline |
Create a new IProtonBuffer that wraps the given portion of the byte array.
The capacity and maximum capacity for the resulting ProtonBuffer should equal to the length of the wrapped array and the returned array offset is set by the caller.
array | The byte array that will be wrapped |
offset | The offset into the byte array where the buffer starts |
length | The length if the view into byte array that is accessible |
Implements Apache.Qpid.Proton.Buffer.IProtonBufferAllocator.