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, sliceSizeModMask
closed, 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, unmap
assertZeroes, clearOverlap, copyFrom, copyTo, copyTo, deleteFile, fileLoad, finalize, hash, isClosed
public 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.Object
public final void ensureAvailable(long offset)
Volume
ensureAvailable
in class Volume
public void close()
public boolean isReadOnly()
isReadOnly
in class Volume
public java.io.File getFile()
Volume
public boolean getFileLocked()
Volume
getFileLocked
in class Volume
Copyright © 2018. All Rights Reserved.