Package com.github.loki4j.client.batch
Class ByteBufferQueue
- java.lang.Object
-
- com.github.loki4j.client.batch.ByteBufferQueue
-
public class ByteBufferQueue extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ByteBufferQueue(long maxSizeBytes, ByteBufferFactory bufferFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BinaryBatchborrowBuffer()longgetSizeBytes()booleanoffer(long batchId, int itemsCount, int claimBytes, java.util.function.Consumer<java.nio.ByteBuffer> write)voidreturnBuffer(BinaryBatch batch)
-
-
-
Constructor Detail
-
ByteBufferQueue
public ByteBufferQueue(long maxSizeBytes, ByteBufferFactory bufferFactory)
-
-
Method Detail
-
offer
public boolean offer(long batchId, int itemsCount, int claimBytes, java.util.function.Consumer<java.nio.ByteBuffer> write)
-
borrowBuffer
public BinaryBatch borrowBuffer()
-
returnBuffer
public void returnBuffer(BinaryBatch batch)
-
getSizeBytes
public long getSizeBytes()
-
-