Interface BufferManager

All Superinterfaces:
AutoCloseable

public interface BufferManager extends AutoCloseable
Manages a list of ArrowBufs that can be reallocated as needed. Upon re-allocation the old buffer will be freed. Managing a list of these buffers prevents some parts of the system from needing to define a correct location to place the final call to free them.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    Get a managed buffer of indeterminate size.
    getManagedBuffer(long size)
    Get a managed buffer of at least a certain size.
    replace(ArrowBuf old, long newSize)
    Replace an old buffer with a new version at least of the provided size.
  • Method Details

    • replace

      ArrowBuf replace(ArrowBuf old, long newSize)
      Replace an old buffer with a new version at least of the provided size. Does not copy data.
      Parameters:
      old - Old Buffer that the user is no longer going to use.
      newSize - Size of new replacement buffer.
      Returns:
      A new version of the buffer.
    • getManagedBuffer

      ArrowBuf getManagedBuffer()
      Get a managed buffer of indeterminate size.
      Returns:
      A buffer.
    • getManagedBuffer

      ArrowBuf getManagedBuffer(long size)
      Get a managed buffer of at least a certain size.
      Parameters:
      size - The desired size
      Returns:
      A buffer
    • close

      void close()
      Specified by:
      close in interface AutoCloseable