public static class ByteBufferPool.Lease
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.nio.ByteBuffer> |
buffers |
private ByteBufferPool |
byteBufferPool |
private java.util.List<java.lang.Boolean> |
recycles |
Constructor and Description |
---|
Lease(ByteBufferPool byteBufferPool) |
Modifier and Type | Method and Description |
---|---|
java.nio.ByteBuffer |
acquire(int capacity,
boolean direct) |
void |
append(java.nio.ByteBuffer buffer,
boolean recycle) |
java.util.List<java.nio.ByteBuffer> |
getByteBuffers() |
int |
getSize() |
long |
getTotalLength() |
void |
insert(int index,
java.nio.ByteBuffer buffer,
boolean recycle) |
void |
recycle() |
private final ByteBufferPool byteBufferPool
private final java.util.List<java.nio.ByteBuffer> buffers
private final java.util.List<java.lang.Boolean> recycles
public Lease(ByteBufferPool byteBufferPool)
public java.nio.ByteBuffer acquire(int capacity, boolean direct)
public void append(java.nio.ByteBuffer buffer, boolean recycle)
public void insert(int index, java.nio.ByteBuffer buffer, boolean recycle)
public java.util.List<java.nio.ByteBuffer> getByteBuffers()
public long getTotalLength()
public int getSize()
public void recycle()