public static final class Volume.MemoryVol extends Volume.ByteBufferVol
Volume.ByteArrayVol, Volume.ByteBufferVol, Volume.ByteBufferVolSingle, Volume.FileChannelVol, Volume.MappedFileVol, Volume.MappedFileVolSingle, Volume.MemoryVol, Volume.MemoryVolSingle, Volume.RandomAccessFileVol, Volume.ReadOnly, Volume.SingleByteArrayVol, Volume.VolumeFactory| Modifier and Type | Field and Description |
|---|---|
static Volume.VolumeFactory |
FACTORY
factory for DirectByteBuffer storage
|
static Volume.VolumeFactory |
FACTORY_WITH_CLEANER_HACK
factory for DirectByteBuffer storage
|
protected boolean |
useDirectBuffer |
cleanerHackEnabled, growLock, readOnly, slices, sliceShift, sliceSize, sliceSizeModMaskclosed, LOG, UNSAFE_VOL_FACTORY| Constructor and Description |
|---|
Volume.MemoryVol(boolean useDirectBuffer,
int sliceShift,
boolean cleanerHackEnabled,
long initSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
ensureAvailable(long offset)
Check space allocated by Volume is bigger or equal to given offset.
|
File |
getFile()
returns underlying file if it exists
|
boolean |
getFileLocked()
return true if this Volume holds exclusive lock over its file
|
long |
length() |
void |
sync() |
String |
toString() |
void |
truncate(long size) |
clear, getByte, getData, getDataInput, getDataInputOverlap, getInt, getLong, getPackedLong, getSixLong, getSlice, getUnsignedByte, getUnsignedShort, isSliced, putByte, putData, putData, putDataOverlap, putInt, putLong, putPackedLong, putSixLong, putUnsignedByte, putUnsignedShort, sliceSize, toByte, toByte, transferInto, unmapassertZeroes, copyEntireVolumeTo, deleteFile, fileLoad, finalize, getLongPackBidi, getLongPackBidiReverse, hash, isClosed, putLongPackBidi, volumeTransferpublic static final Volume.VolumeFactory FACTORY
public static final Volume.VolumeFactory FACTORY_WITH_CLEANER_HACK
protected final boolean useDirectBuffer
public Volume.MemoryVol(boolean useDirectBuffer,
int sliceShift,
boolean cleanerHackEnabled,
long initSize)
public final void ensureAvailable(long offset)
VolumeensureAvailable in class Volumepublic void close()
public File getFile()
Volumepublic boolean getFileLocked()
VolumegetFileLocked in class VolumeCopyright © 2015. All Rights Reserved.