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

com.firefly.net.BufferPool Maven / Gradle / Ivy

There is a newer version: 5.0.0-dev6
Show newest version
package com.firefly.net;

import java.nio.ByteBuffer;

public interface BufferPool {

    /**
     * Get byte buffer
     *
     * @param size buffer size
     * @return Byte buffer
     */
    ByteBuffer acquire(int size);

    /**
     * Return buffer to the pool
     *
     * @param buffer Byte buffer
     */
    void release(ByteBuffer buffer);

    int size();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy