Package org.h2.mvstore
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 org.h2.mvstore.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 org.h2.mvstore.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
public void free(long pos, int length) Description copied from class:FileStoreMark the space as free. -
writeFully
Description copied from class:FileStoreWrite to the file.- Overrides:
writeFullyin classFileStore- Parameters:
pos- the write positionsrc- the source buffer
-
writeNewEntry
-
truncate
public void truncate(long size) Description copied from class:FileStoreTruncate the file. -
close
public void close()Description copied from class:FileStoreClose this store. -
sync
public void sync()Description copied from class:FileStoreFlush all changes. -
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
-