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 TypeMethodDescriptionvoid
close()
Close this store.void
free
(long pos, int length) Mark the space as free.int
Get the default retention time for this store in milliseconds.void
Try to open the file.readFully
(long pos, int len) Read from the file.void
sync()
Flush all changes.toString()
void
truncate
(long size) Truncate the file.void
writeFully
(long pos, ByteBuffer src) Write to the file.private void
writeNewEntry
(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:FileStore
Try to open the file. -
toString
-
readFully
Description copied from class:FileStore
Read from the file. -
free
public void free(long pos, int length) Description copied from class:FileStore
Mark the space as free. -
writeFully
Description copied from class:FileStore
Write to the file.- Overrides:
writeFully
in classFileStore
- Parameters:
pos
- the write positionsrc
- the source buffer
-
writeNewEntry
-
truncate
public void truncate(long size) Description copied from class:FileStore
Truncate the file. -
close
public void close()Description copied from class:FileStore
Close this store. -
sync
public void sync()Description copied from class:FileStore
Flush all changes. -
getDefaultRetentionTime
public int getDefaultRetentionTime()Description copied from class:FileStore
Get the default retention time for this store in milliseconds.- Overrides:
getDefaultRetentionTime
in classFileStore
- Returns:
- the retention time
-