Package io.permazen.cli.config
Class KeyValueCliConfig
java.lang.Object
io.permazen.cli.config.CliConfig
io.permazen.cli.config.KeyValueCliConfig
- Direct Known Subclasses:
CoreApiCliConfig
Configuration for a CLI application supporting key/value database interaction.
-
Field Summary
Modifier and TypeFieldDescriptionprotected KVDatabase
protected String
protected io.permazen.cli.config.KeyValueCliConfig.KVImpl<?>
protected final ArrayList<io.permazen.cli.config.KeyValueCliConfig.KVImpl<?>>
protected KVDatabase
protected AtomicKVStore
Fields inherited from class io.permazen.cli.config.CliConfig
helpOption, loader, log, readOnlyOption, setReadOnly, setVerbose, verboseOption
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addKeyValueImplementationOptions
(joptsimple.OptionParser parser) Add key/value database implementation command line options.void
addOptions
(joptsimple.OptionParser parser) Configure anOptionParser
with the comand line flags supported by this instance.protected void
configureSession
(Session session) Configure a newSession
.protected void
processOptions
(joptsimple.OptionSet options) Review parsed options and do any preprocessing before starting database.void
Shutdown the database.void
startupDatabase
(joptsimple.OptionSet options) Configure and start up the database based on the parsed command line options.Methods inherited from class io.permazen.cli.config.CliConfig
addGenericOptions, createOptionParser, getDatabase, getPermazen, instantiateClass, loadClass, newPermazenExec, newPermazenShell, showHelp, startup
-
Field Details
-
kvis
-
kvdb
-
kvdbDescription
-
kvi
protected io.permazen.cli.config.KeyValueCliConfig.KVImpl<?> kvi -
nestedKVStore
-
nestedKVDatabase
-
-
Constructor Details
-
KeyValueCliConfig
public KeyValueCliConfig()
-
-
Method Details
-
addOptions
public void addOptions(joptsimple.OptionParser parser) Configure anOptionParser
with the comand line flags supported by this instance.- Overrides:
addOptions
in classCliConfig
- Parameters:
parser
- command line flag parser- Throws:
IllegalArgumentException
- ifparser
is null
-
addKeyValueImplementationOptions
protected void addKeyValueImplementationOptions(joptsimple.OptionParser parser) Add key/value database implementation command line options.- Parameters:
parser
- command line flag parser- Throws:
IllegalArgumentException
- ifparser
is null- See Also:
-
processOptions
protected void processOptions(joptsimple.OptionSet options) Description copied from class:CliConfig
Review parsed options and do any preprocessing before starting database.- Overrides:
processOptions
in classCliConfig
- Parameters:
options
- parsed command line options
-
startupDatabase
public void startupDatabase(joptsimple.OptionSet options) Description copied from class:CliConfig
Configure and start up the database based on the parsed command line options.- Specified by:
startupDatabase
in classCliConfig
- Parameters:
options
- parsed command line options
-
shutdownDatabase
public void shutdownDatabase()Description copied from class:CliConfig
Shutdown the database.- Specified by:
shutdownDatabase
in classCliConfig
-
getDatabaseDescription
- Specified by:
getDatabaseDescription
in classCliConfig
-
getKVDatabase
- Overrides:
getKVDatabase
in classCliConfig
-
configureSession
Description copied from class:CliConfig
Configure a newSession
.- Overrides:
configureSession
in classCliConfig
- Parameters:
session
- new session to configure
-