public interface DiskOptimizationStrategy
Modifier and Type | Field and Description |
---|---|
static int |
MAX_BUFFER_SIZE |
static int |
MIN_BUFFER_SIZE |
static int |
MIN_BUFFER_SIZE_MASK |
Modifier and Type | Method and Description |
---|---|
int |
bufferSize(long recordSize) |
default int |
roundBufferSize(long size)
Round up to the next multiple of 4k but no more than
MAX_BUFFER_SIZE . |
static int |
roundForCaching(int size,
boolean roundUp)
Round either up or down to the next power of two, which is required by the
ChunkCache.CachingRebufferer , but capping between MIN_BUFFER_SIZE
and MAX_BUFFER_SIZE . |
static final int MIN_BUFFER_SIZE
static final int MIN_BUFFER_SIZE_MASK
static final int MAX_BUFFER_SIZE
int bufferSize(long recordSize)
recordSize
- record sizedefault int roundBufferSize(long size)
MAX_BUFFER_SIZE
.static int roundForCaching(int size, boolean roundUp)
ChunkCache.CachingRebufferer
, but capping between MIN_BUFFER_SIZE
and MAX_BUFFER_SIZE
.size
- - the size to round to a power of two, normally this is a buffer size that was previously
returned by a bufferSize(long)
.roundUp
- - whether to round up or downMAX_BUFFER_SIZE
or smaller than MIN_BUFFER_SIZE
.Copyright © 2009- The Apache Software Foundation