![JAR search and dependency download from the Maven repository](/logo.png)
org.infinispan.server.resp.ByteBufPool Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of infinispan-server-resp Show documentation
Show all versions of infinispan-server-resp Show documentation
Infinispan Resp Protocol Server
package org.infinispan.server.resp;
import java.util.function.IntFunction;
import io.netty.buffer.ByteBuf;
@FunctionalInterface
public interface ByteBufPool extends IntFunction {
/**
* This method will return a pooled ByteBuf.
* This buffer may already have bytes written to it.
* A caller should only ever write additional bytes to the buffer and not change it in any other way.
*
* The returned ByteBuf should never be written as the decoder will handle this instead
*
* @param requiredSize The amount of bytes required to be writable into the ByteBuf
* @return a ByteBuf to write those bytes to
*/
default ByteBuf acquire(int requiredSize) {
return apply(requiredSize);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy