public final class ByteBufferMemoryVol extends ByteBufferVol
| Modifier and Type | Field and Description |
|---|---|
static VolumeFactory |
FACTORY
factory for DirectByteBuffer storage
|
static 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 |
|---|
ByteBufferMemoryVol(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.
|
java.io.File |
getFile()
returns underlying file if it exists
|
boolean |
getFileLocked()
return true if this Volume holds exclusive lock over its file
|
boolean |
isReadOnly() |
long |
length() |
void |
sync() |
java.lang.String |
toString() |
void |
truncate(long size) |
clear, copyTo, 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, unmapassertZeroes, clearOverlap, copyFrom, copyTo, copyTo, deleteFile, fileLoad, finalize, hash, isClosedpublic static final VolumeFactory FACTORY
public static final VolumeFactory FACTORY_WITH_CLEANER_HACK
protected final boolean useDirectBuffer
public ByteBufferMemoryVol(boolean useDirectBuffer,
int sliceShift,
boolean cleanerHackEnabled,
long initSize)
public java.lang.String toString()
toString in class java.lang.Objectpublic final void ensureAvailable(long offset)
VolumeensureAvailable in class Volumepublic void close()
public boolean isReadOnly()
isReadOnly in class Volumepublic java.io.File getFile()
Volumepublic boolean getFileLocked()
VolumegetFileLocked in class VolumeCopyright © 2018. All Rights Reserved.