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 boolean |
asyncWriteEnabled
if Async Write is enabled, do not use unmap hack see
https://github.com/jankotek/MapDB/issues/442
|
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) |
protected |
ByteBufferVol(boolean readOnly,
long sizeLimit,
int chunkShift,
boolean asyncWriteEnabled) |
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, fileFactory, getFile, getPackedLong, getSixLong, getUnsignedByte, getUnsignedShort, memoryFactory, putPackedLong, putSixLong, putUnsignedByte, putUnsignedShort, sync, truncate, volumeForFile, volumeForFile, volumeTransfer
protected 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 final boolean asyncWriteEnabled
protected ByteBufferVol(boolean readOnly, long sizeLimit, int chunkShift)
protected ByteBufferVol(boolean readOnly, long sizeLimit, int chunkShift, boolean asyncWriteEnabled)
public final boolean tryAvailable(long offset)
tryAvailable
in class Volume
protected 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 Volume
protected void unmap(MappedByteBuffer b)
Copyright © 2019. All rights reserved.