public static class ByteBufferPool.Bucket
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
_capacity |
private ByteBufferPool |
_pool |
private java.util.Deque<java.nio.ByteBuffer> |
_queue |
private java.util.concurrent.atomic.AtomicInteger |
_space |
Constructor and Description |
---|
Bucket(ByteBufferPool pool,
int bufferSize,
int maxSize) |
Modifier and Type | Method and Description |
---|---|
java.nio.ByteBuffer |
acquire(boolean direct) |
void |
clear() |
(package private) boolean |
isEmpty() |
private void |
queueClear() |
private void |
queueOffer(java.nio.ByteBuffer buffer) |
private java.nio.ByteBuffer |
queuePoll() |
void |
release(java.nio.ByteBuffer buffer) |
(package private) int |
size() |
java.lang.String |
toString() |
private final java.util.Deque<java.nio.ByteBuffer> _queue
private final ByteBufferPool _pool
private final int _capacity
private final java.util.concurrent.atomic.AtomicInteger _space
public Bucket(ByteBufferPool pool, int bufferSize, int maxSize)
public java.nio.ByteBuffer acquire(boolean direct)
public void release(java.nio.ByteBuffer buffer)
public void clear()
private void queueOffer(java.nio.ByteBuffer buffer)
private java.nio.ByteBuffer queuePoll()
private void queueClear()
boolean isEmpty()
int size()
public java.lang.String toString()
toString
in class java.lang.Object