HadoopShims.ByteBufferPoolShim (ORC Shims 1.6.1 API)
Date: 2019-10-26

org.apache.orc.impl

## Interface HadoopShims.ByteBufferPoolShim

- Enclosing interface:
    HadoopShims

      public static interface HadoopShims.ByteBufferPoolShim

  a hadoop.io ByteBufferPool shim.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `ByteBuffer` | `getBuffer(boolean direct, int length)` Get a new ByteBuffer from the pool.
    `void` | `putBuffer(ByteBuffer buffer)` Release a buffer back to the pool.

- - ### Method Detail

    - #### getBuffer

          ByteBuffer getBuffer(boolean direct,
                               int length)

      Get a new ByteBuffer from the pool. The pool can provide this from removing a buffer from its internal cache, or by allocating a new buffer.
      Parameters:
        `direct` - Whether the buffer should be direct.
        `length` - The minimum length the buffer will have.
      Returns:
        A new ByteBuffer. Its capacity can be less than what was requested, but must be at least 1 byte.

    - #### putBuffer

          void putBuffer(ByteBuffer buffer)

      Release a buffer back to the pool. The pool may choose to put this buffer into its cache/free it.
      Parameters:
        `buffer` - a direct bytebuffer

Copyright © 2013–2019 The Apache Software Foundation. All rights reserved.