|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.mvstore.FileStore
org.h2.mvstore.OffHeapStore
public class OffHeapStore
A storage mechanism that "persists" data in the off-heap area of the main memory.
Field Summary |
---|
Fields inherited from class org.h2.mvstore.FileStore |
---|
encryptedFile, file, fileLock, fileName, fileSize, freeSpace, readBytes, readCount, readOnly, writeBytes, writeCount |
Constructor Summary | |
---|---|
OffHeapStore()
|
Method Summary | |
---|---|
void |
close()
Close this store. |
void |
free(long pos,
int length)
Mark the space as free. |
int |
getDefaultRetentionTime()
Get the default retention time for this store in milliseconds. |
void |
open(java.lang.String fileName,
boolean readOnly,
char[] encryptionKey)
Try to open the file. |
java.nio.ByteBuffer |
readFully(long pos,
int len)
Read from the file. |
void |
sync()
Flush all changes. |
java.lang.String |
toString()
|
void |
truncate(long size)
Truncate the file. |
void |
writeFully(long pos,
java.nio.ByteBuffer src)
Write to the file. |
Methods inherited from class org.h2.mvstore.FileStore |
---|
allocate, clear, getEncryptedFile, getFile, getFillRate, getReadBytes, getReadCount, getWriteBytes, getWriteCount, isReadOnly, markUsed, size |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OffHeapStore()
Method Detail |
---|
public void open(java.lang.String fileName, boolean readOnly, char[] encryptionKey)
FileStore
open
in class FileStore
fileName
- the file namereadOnly
- whether the file should only be opened in read-only mode,
even if the file is writableencryptionKey
- the encryption key, or null if encryption is not
usedpublic java.lang.String toString()
toString
in class FileStore
public java.nio.ByteBuffer readFully(long pos, int len)
FileStore
readFully
in class FileStore
pos
- the write positionlen
- the number of bytes to read
public void free(long pos, int length)
FileStore
free
in class FileStore
pos
- the position in byteslength
- the number of bytespublic void writeFully(long pos, java.nio.ByteBuffer src)
FileStore
writeFully
in class FileStore
pos
- the write positionsrc
- the source bufferpublic void truncate(long size)
FileStore
truncate
in class FileStore
size
- the new file sizepublic void close()
FileStore
close
in class FileStore
public void sync()
FileStore
sync
in class FileStore
public int getDefaultRetentionTime()
FileStore
getDefaultRetentionTime
in class FileStore
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |