All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.luben.zstd.NoPool Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
package com.github.luben.zstd;

import java.nio.ByteBuffer;

/**
 * Implementation of `BufferPool` that does not recycle buffers.
 */
public class NoPool implements BufferPool {
    public static final BufferPool INSTANCE = new NoPool();

    private NoPool() {
    }

    @Override
    public ByteBuffer get(int capacity) {
       return ByteBuffer.allocate(capacity);
    }

    @Override
    public void release(ByteBuffer buffer) {
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy