Class BufferAllocatorMem

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

public class BufferAllocatorMem extends Object implements BufferAllocator
  • Constructor Details

    • BufferAllocatorMem

      public BufferAllocatorMem()
  • 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