public static final class Volume.MappedFileVol extends Volume.ByteBufferVol
Volume.ByteBufferVol, Volume.Factory, Volume.FileChannelVol, Volume.MappedFileVol, Volume.MemoryVol| Modifier and Type | Field and Description |
|---|---|
protected java.io.File |
file |
protected java.nio.channels.FileChannel |
fileChannel |
protected java.nio.channels.FileChannel.MapMode |
mapMode |
protected java.io.RandomAccessFile |
raf |
asyncWriteEnabled, chunks, chunkShift, chunkSize, chunkSizeModMask, cleanerHackDisabled, growLock, hasLimit, readOnly, sizeLimit| Constructor and Description |
|---|
MappedFileVol(java.io.File file,
boolean readOnly,
long sizeLimit,
int chunkShift,
int sizeIncrement) |
MappedFileVol(java.io.File file,
boolean readOnly,
long sizeLimit,
int chunkShift,
int sizeIncrement,
boolean asyncWriteEnabled) |
MappedFileVol(java.io.File file,
boolean readOnly,
long sizeLimit,
int chunkShift,
int sizeIncrement,
boolean asyncWriteEnabled,
boolean cleanerHackDisable) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
deleteFile() |
java.io.File |
getFile()
returns underlying file if it exists
|
protected java.nio.ByteBuffer |
makeNewBuffer(long offset) |
void |
sync() |
void |
truncate(long size) |
getByte, getDataInput, getInt, getLong, isEmpty, isSliced, putByte, putData, putData, putInt, putLong, tryAvailable, unmapensureAvailable, fileFactory, fileFactory, fileFactory, fileFactory, getPackedLong, getSixLong, getUnsignedByte, getUnsignedShort, memoryFactory, putPackedLong, putSixLong, putUnsignedByte, putUnsignedShort, volumeForFile, volumeForFile, volumeForFile, volumeTransferprotected final java.io.File file
protected final java.nio.channels.FileChannel fileChannel
protected final java.nio.channels.FileChannel.MapMode mapMode
protected final java.io.RandomAccessFile raf
public MappedFileVol(java.io.File file,
boolean readOnly,
long sizeLimit,
int chunkShift,
int sizeIncrement)
public MappedFileVol(java.io.File file,
boolean readOnly,
long sizeLimit,
int chunkShift,
int sizeIncrement,
boolean asyncWriteEnabled)
public MappedFileVol(java.io.File file,
boolean readOnly,
long sizeLimit,
int chunkShift,
int sizeIncrement,
boolean asyncWriteEnabled,
boolean cleanerHackDisable)
protected java.nio.ByteBuffer makeNewBuffer(long offset)
makeNewBuffer in class Volume.ByteBufferVolpublic void deleteFile()
deleteFile in class Volumepublic java.io.File getFile()
Volume