Proton DotNet
|
Defines the interface for a IProtonBuffer allocator that can be used by the Proton library to allow customization of the buffer types used for IO and application level buffer management. 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[] array) |
Create a new IProtonBuffer that wraps the given byte array. | |
IProtonBuffer | Wrap (byte[] array, int offset, int length) |
Create a new IProtonBuffer that wraps the given portion of the byte array. | |
Defines the interface for a IProtonBuffer allocator that can be used by the Proton library to allow customization of the buffer types used for IO and application level buffer management.
IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAllocator.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.
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.
Implemented in Apache.Qpid.Proton.Buffer.ProtonByteBufferAllocator.
IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAllocator.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.
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 |
Implemented in Apache.Qpid.Proton.Buffer.ProtonByteBufferAllocator.
IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAllocator.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.
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 |
Implemented in Apache.Qpid.Proton.Buffer.ProtonByteBufferAllocator.
IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAllocator.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.
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 |
Implemented in Apache.Qpid.Proton.Buffer.ProtonByteBufferAllocator.
IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAllocator.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.
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 |
Implemented in Apache.Qpid.Proton.Buffer.ProtonByteBufferAllocator.
IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAllocator.Wrap | ( | byte[] | array | ) |
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 |
Implemented in Apache.Qpid.Proton.Buffer.ProtonByteBufferAllocator.
IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAllocator.Wrap | ( | byte[] | array, |
int | offset, | ||
int | length | ||
) |
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 |
Implemented in Apache.Qpid.Proton.Buffer.ProtonByteBufferAllocator.