org.terracotta.offheapstore.buffersource
Class OffHeapBufferSource

java.lang.Object
  extended by org.terracotta.offheapstore.buffersource.OffHeapBufferSource
All Implemented Interfaces:
BufferSource

public class OffHeapBufferSource
extends Object
implements BufferSource

An unlimited direct byte buffer source.

Author:
Chris Dennis

Constructor Summary
OffHeapBufferSource()
           
 
Method Summary
 ByteBuffer allocateBuffer(int size)
          Allocates a buffer of the given size.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OffHeapBufferSource

public OffHeapBufferSource()
Method Detail

allocateBuffer

public ByteBuffer allocateBuffer(int size)
Description copied from interface: BufferSource
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.

Specified by:
allocateBuffer in interface BufferSource
Parameters:
size - required buffer size
Returns:
a buffer of the required size

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015. All Rights Reserved.