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 java.nio.ByteBuffer[] |
chunks |
protected int |
chunkShift |
protected int |
chunkSize |
protected int |
chunkSizeModMask |
protected boolean |
cleanerHackDisabled |
protected java.util.concurrent.locks.ReentrantLock |
growLock |
protected boolean |
hasLimit |
protected boolean |
readOnly |
protected long |
sizeLimit |
private static boolean |
unmapHackSupported |
private static boolean |
windowsWorkaround |
| 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 java.nio.ByteBuffer |
makeNewBuffer(long offset) |
void |
putByte(long offset,
byte value) |
void |
putData(long offset,
byte[] src,
int srcPos,
int srcSize) |
void |
putData(long offset,
java.nio.ByteBuffer buf) |
void |
putInt(long offset,
int value) |
void |
putLong(long offset,
long value) |
boolean |
tryAvailable(long offset) |
protected void |
unmap(java.nio.MappedByteBuffer b)
Hack to unmap MappedByteBuffer.
|
close, deleteFile, ensureAvailable, fileFactory, fileFactory, fileFactory, fileFactory, getFile, getPackedLong, getSixLong, getUnsignedByte, getUnsignedShort, memoryFactory, putPackedLong, putSixLong, putUnsignedByte, putUnsignedShort, sync, truncate, volumeForFile, volumeForFile, volumeForFile, volumeTransferprotected final java.util.concurrent.locks.ReentrantLock growLock
protected final long sizeLimit
protected final boolean hasLimit
protected final int chunkShift
protected final int chunkSizeModMask
protected final int chunkSize
protected volatile java.nio.ByteBuffer[] chunks
protected final boolean readOnly
protected final boolean asyncWriteEnabled
protected boolean cleanerHackDisabled
private static boolean unmapHackSupported
private static boolean windowsWorkaround
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 Volumeprotected abstract java.nio.ByteBuffer makeNewBuffer(long offset)
public void putData(long offset,
byte[] src,
int srcPos,
int srcSize)
public final void putData(long offset,
java.nio.ByteBuffer buf)
public final DataInput2 getDataInput(long offset, int size)
getDataInput in class Volumeprotected void unmap(java.nio.MappedByteBuffer b)