| Modifier and Type | Method and Description |
|---|---|
Options |
Options.blockRestartInterval(int blockRestartInterval)
Number of keys between restart points for delta encoding of keys.
|
Options |
Options.blockSize(int blockSize)
Approximate size of user data packed per block.
|
Options |
Options.cacheSize(long cacheSize)
If
cacheSize is zero, no block cache will be used-
If non-zero, use the specified cache size for blocks. |
Options |
Options.comparator(DBComparator comparator)
Parameters that affect behavior
|
Options |
Options.compressionType(CompressionType compressionType)
Compress blocks using the specified compression algorithm.
|
Options |
Options.createIfMissing(boolean createIfMissing) |
Options |
Options.errorIfExists(boolean errorIfExists)
If true, an error is raised if the database already exists.
|
Options |
Options.filterPolicy(XFilterPolicy filterPolicy)
If non-null, use the specified filter policy to reduce disk reads.
|
static Options |
Options.fromOptions(Options options)
Clone, create a copy of the provided instance of
Options |
Options |
Options.logger(Logger logger)
Any internal progress/error information generated by the db will
be written to
logger if it is non-null, or to a file stored
in the same directory as the DB contents if info_log is null. |
Options |
Options.maxFileSize(int maxFileSize)
Leveldb will write up to this amount of bytes to a file before
switching to a new one.
|
Options |
Options.maxOpenFiles(int maxOpenFiles)
Number of open files that can be used by the DB.
|
static Options |
Options.newDefaultOptions()
Create an Options object with default values for all fields.
|
Options |
Options.paranoidChecks(boolean paranoidChecks)
If true, the implementation will do aggressive checking of the
data it is processing and will stop early if it detects any
errors.
|
Options |
Options.reuseLogs(boolean reuseLogs)
If true, append to existing MANIFEST and log files
when a database is opened.
|
Options |
Options.writeBufferSize(int writeBufferSize)
Parameters that affect performance
|
| Modifier and Type | Method and Description |
|---|---|
void |
DBFactory.destroy(File path,
Options options)
Destroy a database, delete DB files and root directory
|
static Options |
Options.fromOptions(Options options)
Clone, create a copy of the provided instance of
Options |
DB |
DBFactory.open(File path,
Options options)
Open/Create a new Database using provided "options" to configure DB
behavior.
|
void |
DBFactory.repair(File path,
Options options)
Try to repair a corrupted DB or not closed properly.
|
Copyright © 2011–2020. All rights reserved.