public abstract static class Volume.ByteBufferVol extends Volume
Volume.ByteBufferVol, Volume.Factory, Volume.FileChannelVol, Volume.MappedFileVol, Volume.MemoryVol| Modifier and Type | Field and Description |
|---|---|
protected ByteBuffer[] |
chunks |
protected int |
chunkShift |
protected int |
chunkSize |
protected int |
chunkSizeModMask |
protected ReentrantLock |
growLock |
protected boolean |
hasLimit |
protected boolean |
readOnly |
protected long |
sizeLimit |
| Modifier | Constructor and Description |
|---|---|
protected |
ByteBufferVol(boolean readOnly,
long sizeLimit,
int chunkShift) |
| Modifier and Type | Method and Description |
|---|---|
byte |
getByte(long offset) |
DataInput2 |
getDataInput(long offset,
int size) |
int |
getInt(long offset) |
long |
getLong(long offset) |
boolean |
isEmpty() |
boolean |
isSliced() |
protected abstract ByteBuffer |
makeNewBuffer(long offset) |
void |
putByte(long offset,
byte value) |
void |
putData(long offset,
byte[] src,
int srcPos,
int srcSize) |
void |
putData(long offset,
ByteBuffer buf) |
void |
putInt(long offset,
int value) |
void |
putLong(long offset,
long value) |
boolean |
tryAvailable(long offset) |
protected void |
unmap(MappedByteBuffer b)
Hack to unmap MappedByteBuffer.
|
close, deleteFile, ensureAvailable, fileFactory, fileFactory, getFile, getPackedLong, getSixLong, getUnsignedByte, getUnsignedShort, memoryFactory, putPackedLong, putSixLong, putUnsignedByte, putUnsignedShort, sync, truncate, volumeForFile, volumeTransferprotected final ReentrantLock growLock
protected final long sizeLimit
protected final boolean hasLimit
protected final int chunkShift
protected final int chunkSizeModMask
protected final int chunkSize
protected volatile ByteBuffer[] chunks
protected final boolean readOnly
protected ByteBufferVol(boolean readOnly,
long sizeLimit,
int chunkShift)
public final boolean tryAvailable(long offset)
tryAvailable in class Volumeprotected abstract ByteBuffer makeNewBuffer(long offset)
public void putData(long offset,
byte[] src,
int srcPos,
int srcSize)
public final void putData(long offset,
ByteBuffer buf)
public final DataInput2 getDataInput(long offset, int size)
getDataInput in class Volumeprotected void unmap(MappedByteBuffer b)
Copyright © 2015. All rights reserved.