public abstract class TempBufferHolder extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TempBufferHolder.Type
The caching type for the buffer holder.
|
Modifier | Constructor and Description |
---|---|
protected |
TempBufferHolder(boolean autoRewind,
ByteOrder order) |
Modifier and Type | Method and Description |
---|---|
abstract void |
clear()
Releases any referenced memory.
|
ByteBuffer |
getBuffer(PageChannel pageChannel,
int size)
Returns a ByteBuffer of at least the given size, with the limit set to
the given size, and the predefined byteOrder.
|
abstract ByteBuffer |
getExistingBuffer() |
int |
getModCount() |
ByteBuffer |
getPageBuffer(PageChannel pageChannel)
Returns a ByteBuffer of at least the defined page size, with the limit
set to the page size, and the predefined byteOrder.
|
static TempBufferHolder |
newHolder(TempBufferHolder.Type type,
boolean autoRewind)
Creates a new TempBufferHolder.
|
static TempBufferHolder |
newHolder(TempBufferHolder.Type type,
boolean autoRewind,
ByteOrder order)
Creates a new TempBufferHolder.
|
protected abstract void |
setNewBuffer(ByteBuffer newBuffer)
Sets a new buffer for this holder.
|
protected TempBufferHolder(boolean autoRewind, ByteOrder order)
public int getModCount()
public static TempBufferHolder newHolder(TempBufferHolder.Type type, boolean autoRewind)
type
- the type of reference desired for any created bufferautoRewind
- whether or not every get automatically rewinds the
bufferpublic static TempBufferHolder newHolder(TempBufferHolder.Type type, boolean autoRewind, ByteOrder order)
type
- the type of reference desired for any created bufferautoRewind
- whether or not every get automatically rewinds the
bufferorder
- byte order for all allocated bufferspublic final ByteBuffer getPageBuffer(PageChannel pageChannel)
public final ByteBuffer getBuffer(PageChannel pageChannel, int size)
public abstract ByteBuffer getExistingBuffer()
null
if nonepublic abstract void clear()
protected abstract void setNewBuffer(ByteBuffer newBuffer)
Copyright © 2005–2018. All rights reserved.