Class LevelDBUtil

java.lang.Object
io.permazen.kv.leveldb.LevelDBUtil

public final class LevelDBUtil extends Object
Utility methods for use with LevelDB.
  • Field Details

    • LEVELDBJNI_CLASS_NAME

      public static final String LEVELDBJNI_CLASS_NAME
      Class name for the DBFactory provided by leveldbjni.
      See Also:
    • LEVELDB_CLASS_NAME

      public static final String LEVELDB_CLASS_NAME
      Class name for the DBFactory provided by leveldb.
      See Also:
    • DB_FACTORY_PROPERTY

      public static final String DB_FACTORY_PROPERTY
      The name of a system property that can be set to override the default DBFactory logic. Set to the name of a class that implements DBFactory and has a zero-arg constructor.
  • Method Details

    • getDefaultDBFactory

      public static org.iq80.leveldb.DBFactory getDefaultDBFactory()
      Get the default DBFactory.

      This method first tries the class specified by the DB_FACTORY_PROPERTY system property, if any, then leveldbjni, and finally leveldb.

      Returns:
      DBFactory instance
      Throws:
      RuntimeException - if no suitable DBFactory class can be found and instantiated
      See Also: