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 |
chunks, chunkShift, chunkSize, chunkSizeModMask, growLock, hasLimit, readOnly, sizeLimit
Constructor and Description |
---|
MappedFileVol(File file,
boolean readOnly,
long sizeLimit,
int chunkShift,
int sizeIncrement) |
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, unmap
ensureAvailable, fileFactory, fileFactory, getPackedLong, getSixLong, getUnsignedByte, getUnsignedShort, memoryFactory, putPackedLong, putSixLong, putUnsignedByte, putUnsignedShort, volumeForFile, volumeTransfer
protected 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)
protected ByteBuffer makeNewBuffer(long offset)
makeNewBuffer
in class Volume.ByteBufferVol
public void deleteFile()
deleteFile
in class Volume
public File getFile()
Volume
Copyright © 2015. All rights reserved.