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 File |
file |
protected FileChannel |
fileChannel |
protected FileChannel.MapMode |
mapMode |
protected RandomAccessFile |
raf |
asyncWriteEnabled, chunks, chunkShift, chunkSize, chunkSizeModMask, growLock, hasLimit, readOnly, sizeLimit| Constructor and Description |
|---|
MappedFileVol(File file,
boolean readOnly,
long sizeLimit,
int chunkShift,
int sizeIncrement) |
MappedFileVol(File file,
boolean readOnly,
long sizeLimit,
int chunkShift,
int sizeIncrement,
boolean asyncWriteEnabled) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
deleteFile() |
File |
getFile()
returns underlying file if it exists
|
protected 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, getPackedLong, getSixLong, getUnsignedByte, getUnsignedShort, memoryFactory, putPackedLong, putSixLong, putUnsignedByte, putUnsignedShort, volumeForFile, volumeForFile, volumeTransferprotected final File file
protected final FileChannel fileChannel
protected final FileChannel.MapMode mapMode
protected final RandomAccessFile raf
public MappedFileVol(File file, boolean readOnly, long sizeLimit, int chunkShift, int sizeIncrement)
public MappedFileVol(File file, boolean readOnly, long sizeLimit, int chunkShift, int sizeIncrement, boolean asyncWriteEnabled)
protected ByteBuffer makeNewBuffer(long offset)
makeNewBuffer in class Volume.ByteBufferVolpublic void deleteFile()
deleteFile in class Volumepublic File getFile()
VolumeCopyright © 2024. All rights reserved.