abstract class ByteBufferVolSingle : VolumeAbstract Volume over single ByteBuffer, maximal size is 2GB (32bit limit). It leaves ByteBufferVol details (allocation, disposal) on subclasses. Most methods are final for better performance (JIT compiler can inline those).
| UNSAFE_VOL_FACTORY |
static val UNSAFE_VOL_FACTORY: VolumeFactoryIf |
| clear |
open fun clear(startOffset: Long, endOffset: Long): Unit |
| copyTo |
open fun copyTo(inputOffset: Long, target: Volume, targetOffset: Long, size: Long): Unit |
| ensureAvailable |
open fun ensureAvailable(offset: Long): Unit |
| getByte |
fun getByte(offset: Long): Byte |
| getData |
open fun getData(offset: Long, src: ByteArray, srcPos: Int, srcSize: Int): Unit |
| getDataInput |
fun getDataInput(offset: Long, size: Int): ByteBuffer |
| getDataInputOverlap |
open fun getDataInputOverlap(offset: Long, size: Int): DataInput2 |
| getInt |
fun getInt(offset: Long): Int |
| getLong |
fun getLong(offset: Long): Long |
| isSliced |
open fun isSliced(): Boolean |
| putByte |
fun putByte(offset: Long, value: Byte): Unit |
| putData |
open fun putData(offset: Long, src: ByteArray, srcPos: Int, srcSize: Int): Unitfun putData(offset: Long, buf: ByteBuffer): Unit |
| putDataOverlap |
open fun putDataOverlap(offset: Long, data: ByteArray, pos: Int, len: Int): Unit |
| putInt |
fun putInt(offset: Long, value: Int): Unit |
| putLong |
fun putLong(offset: Long, value: Long): Unit |
| sliceSize |
open fun sliceSize(): Int |
| assertZeroes |
open fun assertZeroes(startOffset: Long, endOffset: Long): UnitCheck that all bytes between given offsets are zero. This might cross 1MB boundaries |
| clearOverlap |
open fun clearOverlap(startOffset: Long, endOffset: Long): Unit |
| close |
abstract fun close(): Unit |
| copyFrom |
open fun copyFrom(input: InputStream): UnitCopy content from InputStream into this Volume. |
| copyTo |
open fun copyTo(to: Volume): UnitCopy content of this volume to another. Target volume might grow, but is never shrank. Target is also not synced open fun copyTo(output: OutputStream): UnitCopy content of this volume to OutputStream. |
| deleteFile |
open fun deleteFile(): Unit |
| fileLoad |
open fun fileLoad(): Boolean If underlying storage is memory-mapped-file, this method will try to load and precache all file data into disk cache. Most likely it will call |
| getFile |
abstract fun getFile(): Filereturns underlying file if it exists |
| getFileLocked |
abstract fun getFileLocked(): Booleanreturn true if this Volume holds exclusive lock over its file |
| getPackedLong |
open fun getPackedLong(position: Long): LongUnpack long value from the Volume. Highest 4 bits reused to indicate number of bytes read from Volume. One can use |
| getSixLong |
open fun getSixLong(pos: Long): Long |
| getUnsignedByte |
open fun getUnsignedByte(offset: Long): Int |
| getUnsignedShort |
open fun getUnsignedShort(offset: Long): Int |
| hash |
open fun hash(off: Long, len: Long, seed: Long): LongCalculates XXHash64 from this Volume content. |
| isClosed |
open fun isClosed(): Boolean |
| isReadOnly |
abstract fun isReadOnly(): Boolean |
| length |
abstract fun length(): Long |
| putPackedLong |
open fun putPackedLong(pos: Long, value: Long): IntPut packed long at given position. |
| putSixLong |
open fun putSixLong(pos: Long, value: Long): Unit |
| putUnsignedByte |
open fun putUnsignedByte(offset: Long, b: Int): Unit |
| putUnsignedShort |
open fun putUnsignedShort(offset: Long, value: Int): Unit |
| sync |
abstract fun sync(): Unit |
| truncate |
abstract fun truncate(size: Long): Unit |
| ByteBufferMemoryVolSingle |
class ByteBufferMemoryVolSingle : ByteBufferVolSingleCreated by jan on 3/13/16. |
| MappedFileVolSingle |
class MappedFileVolSingle : ByteBufferVolSingleCreated by jan on 2/29/16. |