Top Description Fields Constructors Methods
com.github.luben.zstd

public Class NoPool

extends Object
implements BufferPool
Class Inheritance
All Implemented Interfaces
com.github.luben.zstd.BufferPool
Imports
java.nio.ByteBuffer

Implementation of `BufferPool` that does not recycle buffers.

Field Summary

Modifier and TypeField and Description
public static final BufferPool

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public ByteBuffer
get(int
the desired size of the buffer
capacity
)

Implements com.github.luben.zstd.BufferPool.get.

Fetch a buffer from the pool.
public void
release(ByteBuffer
the buffer to return
buffer
)

Implements com.github.luben.zstd.BufferPool.release.

Return a buffer to the pool.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final BufferPool INSTANCE

Constructor Detail

NoPoolback to summary
private NoPool()

Method Detail

getback to summary
public ByteBuffer get(int capacity)

Implements com.github.luben.zstd.BufferPool.get.

Doc from com.github.luben.zstd.BufferPool.get.

Fetch a buffer from the pool.

Parameters
capacity:int

the desired size of the buffer

Returns:ByteBuffer

a heap buffer with size at least the `capacity` and arrayOffset of 0

Annotations
@Override
releaseback to summary
public void release(ByteBuffer buffer)

Implements com.github.luben.zstd.BufferPool.release.

Doc from com.github.luben.zstd.BufferPool.release.

Return a buffer to the pool.

Parameters
buffer:ByteBuffer

the buffer to return

Annotations
@Override