org.terracotta.offheapstore.buffersource
Interface BufferSource

All Known Implementing Classes:
HeapBufferSource, OffHeapBufferSource, TimingBufferSource

public interface BufferSource

A source of NIO buffers of some type.

Author:
Chris Dennis

Method Summary
 ByteBuffer allocateBuffer(int size)
          Allocates a buffer of the given size.
 

Method Detail

allocateBuffer

ByteBuffer allocateBuffer(int size)
Allocates a buffer of the given size.

If a suitable buffer cannot be allocated then null should 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


Copyright © 2015. All Rights Reserved.