org.apache.lucene.store

## Class ByteBuffersDataOutput.ByteBufferRecycler

- java.lang.Object
- - org.apache.lucene.store.ByteBuffersDataOutput.ByteBufferRecycler

- Enclosing class:
    ByteBuffersDataOutput

      public static final class ByteBuffersDataOutput.ByteBufferRecycler
      extends Object

  An implementation of a `ByteBuffer` allocation and recycling policy. The blocks are recycled if exactly the same size is requested, otherwise they're released to be GCed.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ByteBufferRecycler(IntFunction<ByteBuffer> delegate)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ByteBuffer` | `allocate(int size)`
    `void` | `reuse(ByteBuffer buffer)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ByteBufferRecycler

          public ByteBufferRecycler(IntFunction<ByteBuffer> delegate)

  - ### Method Detail

    - #### allocate

          public ByteBuffer allocate(int size)

    - #### reuse

          public void reuse(ByteBuffer buffer)

Copyright © 2000-2024 Apache Software Foundation. All Rights Reserved.