Class BufferAllocatorDirect

java.lang.Object
org.apache.jena.tdb1.base.file.BufferAllocatorDirect
All Implemented Interfaces:
org.apache.jena.atlas.lib.Closeable, BufferAllocator

public class BufferAllocatorDirect extends Object implements BufferAllocator
  • Constructor Details

    • BufferAllocatorDirect

      public BufferAllocatorDirect()
  • Method Details

    • allocate

      public ByteBuffer allocate(int capacity)
      Description copied from interface: BufferAllocator
      Allocate and return a ByteBuffer of the given size
      Specified by:
      allocate in interface BufferAllocator
      Parameters:
      capacity - the desired size of the ByteBuffer
      Returns:
      a ByteBuffer with the capacity set to the desired size
    • clear

      public void clear()
      Description copied from interface: BufferAllocator
      Call this method when you are finished with all of the ByteBuffers retrieved from allocate. The BufferAllocator is then free to reuse memory that was previously handed out.
      Specified by:
      clear in interface BufferAllocator
    • close

      public void close()
      Specified by:
      close in interface org.apache.jena.atlas.lib.Closeable