public static final class ByteBuffersDataOutput.ByteBufferRecycler extends Object
ByteBuffer
allocation and recycling policy.
The blocks are recycled if exactly the same size is requested, otherwise
they're released to be GCed.Constructor and Description |
---|
ByteBufferRecycler(IntFunction<ByteBuffer> delegate) |
Modifier and Type | Method and Description |
---|---|
ByteBuffer |
allocate(int size) |
void |
reuse(ByteBuffer buffer) |
public ByteBufferRecycler(IntFunction<ByteBuffer> delegate)
public ByteBuffer allocate(int size)
public void reuse(ByteBuffer buffer)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.