Class KeyValueCliConfig

java.lang.Object
io.permazen.cli.config.CliConfig
io.permazen.cli.config.KeyValueCliConfig
Direct Known Subclasses:
CoreApiCliConfig

public class KeyValueCliConfig extends CliConfig
Configuration for a CLI application supporting key/value database interaction.
  • Field Details

    • kvis

      protected final ArrayList<io.permazen.cli.config.KeyValueCliConfig.KVImpl<?>> kvis
    • kvdb

      protected KVDatabase kvdb
    • kvdbDescription

      protected String kvdbDescription
    • kvi

      protected io.permazen.cli.config.KeyValueCliConfig.KVImpl<?> kvi
    • nestedKVStore

      protected AtomicKVStore nestedKVStore
    • nestedKVDatabase

      protected KVDatabase nestedKVDatabase
  • Constructor Details

    • KeyValueCliConfig

      public KeyValueCliConfig()
  • Method Details

    • addOptions

      public void addOptions(joptsimple.OptionParser parser)
      Configure an OptionParser with the comand line flags supported by this instance.
      Overrides:
      addOptions in class CliConfig
      Parameters:
      parser - command line flag parser
      Throws:
      IllegalArgumentException - if parser 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 - if parser 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 class CliConfig
      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 class CliConfig
      Parameters:
      options - parsed command line options
    • shutdownDatabase

      public void shutdownDatabase()
      Description copied from class: CliConfig
      Shutdown the database.
      Specified by:
      shutdownDatabase in class CliConfig
    • getDatabaseDescription

      public String getDatabaseDescription()
      Specified by:
      getDatabaseDescription in class CliConfig
    • getKVDatabase

      public KVDatabase getKVDatabase()
      Overrides:
      getKVDatabase in class CliConfig
    • configureSession

      protected void configureSession(Session session)
      Description copied from class: CliConfig
      Configure a new Session.
      Overrides:
      configureSession in class CliConfig
      Parameters:
      session - new session to configure