org.mapdb
Class Volume.MappedFileVol

java.lang.Object
  extended by org.mapdb.Volume
      extended by org.mapdb.Volume.ByteBufferVol
          extended by org.mapdb.Volume.MappedFileVol
Enclosing class:
Volume

public static final class Volume.MappedFileVol
extends Volume.ByteBufferVol


Nested Class Summary
 
Nested classes/interfaces inherited from class org.mapdb.Volume
Volume.ByteBufferVol, Volume.Factory, Volume.FileChannelVol, Volume.MappedFileVol, Volume.MemoryVol
 
Field Summary
protected  File file
           
protected  FileChannel fileChannel
           
protected  FileChannel.MapMode mapMode
           
protected  RandomAccessFile raf
           
 
Fields inherited from class org.mapdb.Volume.ByteBufferVol
chunks, chunkShift, chunkSize, chunkSizeModMask, growLock, hasLimit, readOnly, sizeLimit
 
Constructor Summary
Volume.MappedFileVol(File file, boolean readOnly, long sizeLimit, int chunkShift, int sizeIncrement)
           
 
Method Summary
 void close()
           
 void deleteFile()
           
 File getFile()
          returns underlying file if it exists
protected  ByteBuffer makeNewBuffer(long offset)
           
 void sync()
           
 void truncate(long size)
           
 
Methods inherited from class org.mapdb.Volume.ByteBufferVol
getByte, getDataInput, getInt, getLong, isEmpty, isSliced, putByte, putData, putData, putInt, putLong, tryAvailable, unmap
 
Methods inherited from class org.mapdb.Volume
ensureAvailable, fileFactory, fileFactory, getPackedLong, getSixLong, getUnsignedByte, getUnsignedShort, memoryFactory, putPackedLong, putSixLong, putUnsignedByte, putUnsignedShort, volumeForFile, volumeTransfer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

file

protected final File file

fileChannel

protected final FileChannel fileChannel

mapMode

protected final FileChannel.MapMode mapMode

raf

protected final RandomAccessFile raf
Constructor Detail

Volume.MappedFileVol

public Volume.MappedFileVol(File file,
                            boolean readOnly,
                            long sizeLimit,
                            int chunkShift,
                            int sizeIncrement)
Method Detail

close

public void close()
Specified by:
close in class Volume

sync

public void sync()
Specified by:
sync in class Volume

makeNewBuffer

protected ByteBuffer makeNewBuffer(long offset)
Specified by:
makeNewBuffer in class Volume.ByteBufferVol

deleteFile

public void deleteFile()
Specified by:
deleteFile in class Volume

getFile

public File getFile()
Description copied from class: Volume
returns underlying file if it exists

Specified by:
getFile in class Volume

truncate

public void truncate(long size)
Specified by:
truncate in class Volume


Copyright © 2014. All Rights Reserved.