Interface BufferSource
- All Known Implementing Classes:
HeapBufferSource, OffHeapBufferSource, TimingBufferSource
public interface BufferSource
A source of NIO buffers of some type.
-
Method Summary
-
Method Details
-
allocateBuffer
Allocates a buffer of the given size.If a suitable buffer cannot be allocated then
nullshould be returned. Implementations may place restrictions on the valid size value they will accept.- Parameters:
size- required buffer size- Returns:
- a buffer of the required size
-