public class BufferPool
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static boolean |
ALLOCATE_ON_HEAP_WHEN_EXAHUSTED |
static boolean |
DEBUG |
static boolean |
DISABLED |
static long |
MEMORY_USAGE_THRESHOLD |
Constructor and Description |
---|
BufferPool() |
Modifier and Type | Method and Description |
---|---|
static java.nio.ByteBuffer |
get(int size) |
static java.nio.ByteBuffer |
get(int size,
BufferType bufferType) |
static void |
put(java.nio.ByteBuffer buffer) |
static int |
roundUpNormal(int size) |
static long |
sizeInBytes() |
static java.nio.ByteBuffer |
tryGet(int size)
Unlike the get methods, this will return null if the pool is exhausted
|
public static long MEMORY_USAGE_THRESHOLD
public static boolean ALLOCATE_ON_HEAP_WHEN_EXAHUSTED
public static boolean DISABLED
public static boolean DEBUG
public static java.nio.ByteBuffer get(int size)
public static java.nio.ByteBuffer get(int size, BufferType bufferType)
public static java.nio.ByteBuffer tryGet(int size)
public static void put(java.nio.ByteBuffer buffer)
public static long sizeInBytes()
public static int roundUpNormal(int size)
Copyright © 2015 The Apache Software Foundation