public class LevelDBKVImplementation extends KVImplementation<File>
log, XML_DESCRIPTOR_RESOURCE
Constructor and Description |
---|
LevelDBKVImplementation() |
Modifier and Type | Method and Description |
---|---|
LevelDBAtomicKVStore |
createAtomicKVStore(File directory)
Create an
AtomicKVStore using the specified configuration. |
LevelDBKVDatabase |
createKVDatabase(File directory,
KVDatabase kvdb,
AtomicKVStore kvstore)
Create an
KVDatabase using the specified configuration. |
String[][] |
getCommandLineOptions()
Get the command line options supported by this implementation, suitable for display in a usage help message.
|
String |
getDescription(File directory)
Generate a short, human-readable description of the
KVDatabase instance configured as given. |
File |
parseCommandLineOptions(ArrayDeque<String> options)
Parse the specified command line options and return the resulting configuration, if possible.
|
getConfigType, getImplementations, getUsageText, parseCommandLineFlag, parseCommandLineOption, requiresAtomicKVStore, requiresKVDatabase
public String[][] getCommandLineOptions()
KVImplementation
There must be at least one option, to indicate that this implementation is to be used.
getCommandLineOptions
in class KVImplementation<File>
public File parseCommandLineOptions(ArrayDeque<String> options)
KVImplementation
At least one option must be recognized, indicating that this implementation is to be used, otherwise null should be returned.
parseCommandLineOptions
in class KVImplementation<File>
options
- all command line options; upon return, recognized options should be removedpublic LevelDBKVDatabase createKVDatabase(File directory, KVDatabase kvdb, AtomicKVStore kvstore)
KVImplementation
KVDatabase
using the specified configuration.createKVDatabase
in class KVImplementation<File>
directory
- implementation configuration returned by parseCommandLineOptions()
kvdb
- required KVDatabase
; will be null unless KVImplementation.requiresKVDatabase(C)
returned truekvstore
- required AtomicKVStore
; will be null unless KVImplementation.requiresAtomicKVStore(C)
returned trueKVDatabase
instancepublic LevelDBAtomicKVStore createAtomicKVStore(File directory)
KVImplementation
AtomicKVStore
using the specified configuration.
The implementation in KVImplementation
invokes createKVDatabase()
and constructs
a AtomicKVDatabase
from the result. Implementations that natively support the AtomicKVDatabase
interface should override this method.
createAtomicKVStore
in class KVImplementation<File>
directory
- implementation configuration returned by parseCommandLineOptions()
AtomicKVStore
instancepublic String getDescription(File directory)
KVImplementation
KVDatabase
instance configured as given.getDescription
in class KVImplementation<File>
directory
- implementation configuration returned by parseCommandLineOptions()
Copyright © 2019. All rights reserved.