org.xerial.snappy.buffer.DefaultBufferAllocator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jena-fmod-kafka Show documentation
Show all versions of jena-fmod-kafka Show documentation
Apache Jena Fuseki server Kafka connector
package org.xerial.snappy.buffer;
/**
* Simple buffer allocator, which does not reuse the allocated buffer
*/
public class DefaultBufferAllocator
implements BufferAllocator
{
public static BufferAllocatorFactory factory = new BufferAllocatorFactory()
{
public BufferAllocator singleton = new DefaultBufferAllocator();
@Override
public BufferAllocator getBufferAllocator(int bufferSize)
{
return singleton;
}
};
@Override
public byte[] allocate(int size)
{
return new byte[size];
}
@Override
public void release(byte[] buffer)
{
// do nothing
}
}