![JAR search and dependency download from the Maven repository](/logo.png)
com.ociweb.pronghorn.util.ByteBufferLocal Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pronghorn-pipes Show documentation
Show all versions of pronghorn-pipes Show documentation
Ring buffer based queuing utility for applications that require high performance and/or a small
footprint. Well suited for embedded and stream based processing.
The newest version!
package com.ociweb.pronghorn.util;
import java.nio.ByteBuffer;
public class ByteBufferLocal {
private static final ThreadLocal tpr =
new ThreadLocal() {
@Override protected ByteBuffer initialValue() {
return null;
}
};
public static ByteBuffer get(int size) {
ByteBuffer b = tpr.get();
if (b==null || b.capacity()
© 2015 - 2025 Weber Informatics LLC | Privacy Policy