public interface DirectMemUtil
| Modifier and Type | Field and Description |
|---|---|
static int |
REUSABLE_BUFF_SIZE_MAX |
static int |
REUSABLE_BUFF_SIZE_MIN |
static java.lang.ThreadLocal<java.nio.MappedByteBuffer[]> |
REUSABLE_BUFFS |
| Modifier and Type | Method and Description |
|---|---|
static java.nio.MappedByteBuffer |
getThreadLocalReusableBuff(long size)
Selects the thread local direct byte buffer fitting the requested buffer size.
|
static final int REUSABLE_BUFF_SIZE_MIN
static final int REUSABLE_BUFF_SIZE_MAX
static final java.lang.ThreadLocal<java.nio.MappedByteBuffer[]> REUSABLE_BUFFS
static java.nio.MappedByteBuffer getThreadLocalReusableBuff(long size)
throws java.lang.IllegalArgumentException
size - the requested buffer sizeREUSABLE_BUFF_SIZE_MIN and
REUSABLE_BUFF_SIZE_MAXjava.lang.IllegalArgumentException - if the requested size is less than 0