Class OffHeapStore
java.lang.Object
org.h2.mvstore.FileStore
org.h2.mvstore.OffHeapStore
A storage mechanism that "persists" data in the off-heap area of the main
memory.
-
Field Summary
FieldsFields inherited from class FileStore
fileSize, freeSpace, readBytes, readCount, writeBytes, writeCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close this store.voidfree(long pos, int length) Mark the space as free.intGet the default retention time for this store in milliseconds.voidTry to open the file.readFully(long pos, int len) Read from the file.voidsync()Flush all changes.toString()voidtruncate(long size) Truncate the file.voidwriteFully(long pos, ByteBuffer src) Write to the file.private voidwriteNewEntry(long pos, ByteBuffer src) Methods inherited from class FileStore
allocate, clear, getAfterLastBlock, getEncryptedFile, getFile, getFileLengthInUse, getFileName, getFillRate, getFirstFree, getMovePriority, getProjectedFillRate, getReadBytes, getReadCount, getWriteBytes, getWriteCount, isFragmented, isReadOnly, markUsed, predictAllocation, size
-
Field Details
-
memory
-
-
Constructor Details
-
OffHeapStore
public OffHeapStore()
-
-
Method Details
-
open
Description copied from class:FileStoreTry to open the file. -
toString
-
readFully
Description copied from class:FileStoreRead from the file. -
free
-
writeFully
Description copied from class:FileStoreWrite to the file.- Overrides:
writeFullyin classFileStore- Parameters:
pos- the write positionsrc- the source buffer
-
writeNewEntry
-
truncate
-
close
-
sync
-
getDefaultRetentionTime
public int getDefaultRetentionTime()Description copied from class:FileStoreGet the default retention time for this store in milliseconds.- Overrides:
getDefaultRetentionTimein classFileStore- Returns:
- the retention time
-