|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.mvstore.MVStore.Builder
public static class MVStore.Builder
A builder for an MVStore.
Constructor Summary | |
---|---|
MVStore.Builder()
|
Method Summary | |
---|---|
MVStore.Builder |
autoCommitBufferSize(int kb)
Set the size of the write buffer, in KB (for file-based stores). |
MVStore.Builder |
autoCommitDisabled()
Disable auto-commit, by setting the auto-commit delay and auto-commit buffer size to 0. |
MVStore.Builder |
backgroundExceptionHandler(java.lang.Thread.UncaughtExceptionHandler exceptionHandler)
Set the listener to be used for exceptions that occur when writing in the background thread. |
MVStore.Builder |
cacheSize(int mb)
Set the read cache size in MB. |
MVStore.Builder |
compressData()
Compress data before writing using the LZF algorithm. |
MVStore.Builder |
encryptionKey(char[] password)
Encrypt / decrypt the file using the given password. |
MVStore.Builder |
fileName(java.lang.String fileName)
Use the following file name. |
MVStore.Builder |
fileStore(FileStore store)
Use the provided file store instead of the default one. |
static MVStore.Builder |
fromString(java.lang.String s)
Read the configuration from a string. |
MVStore |
open()
Open the store. |
MVStore.Builder |
pageSplitSize(int pageSplitSize)
Set the amount of memory a page should contain at most, in bytes, before it is split. |
MVStore.Builder |
readOnly()
Open the file in read-only mode. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MVStore.Builder()
Method Detail |
---|
public MVStore.Builder autoCommitDisabled()
public MVStore.Builder autoCommitBufferSize(int kb)
The default is 512 KB.
When the value is set to 0 or lower, data is not automatically stored.
kb
- the write buffer size, in kilobytes
public MVStore.Builder fileName(java.lang.String fileName)
fileName
- the file name
public MVStore.Builder encryptionKey(char[] password)
password
- the password
public MVStore.Builder readOnly()
If this option is not used, the file is locked exclusively.
Please note a store may only be opened once in every JVM (no matter whether it is opened in read-only or read-write mode), because each file may be locked only once in a process.
public MVStore.Builder cacheSize(int mb)
mb
- the cache size in megabytes
public MVStore.Builder compressData()
This setting only affects writes; it is not necessary to enable compression when reading, even if compression was enabled when writing.
public MVStore.Builder pageSplitSize(int pageSplitSize)
pageSplitSize
- the page size
public MVStore.Builder backgroundExceptionHandler(java.lang.Thread.UncaughtExceptionHandler exceptionHandler)
exceptionHandler
- the handler
public MVStore.Builder fileStore(FileStore store)
store
- the file store
public MVStore open()
public java.lang.String toString()
toString
in class java.lang.Object
public static MVStore.Builder fromString(java.lang.String s)
s
- the string representation
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |