Package io.permazen.kv.leveldb
Class LevelDBUtil
java.lang.Object
io.permazen.kv.leveldb.LevelDBUtil
Utility methods for use with LevelDB.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of a system property that can be set to override the defaultDBFactorylogic.static final StringClass name for theDBFactoryprovided by leveldb.static final StringClass name for theDBFactoryprovided by leveldbjni. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.iq80.leveldb.DBFactoryGet the defaultDBFactory.
-
Field Details
-
LEVELDBJNI_CLASS_NAME
Class name for theDBFactoryprovided by leveldbjni.- See Also:
-
LEVELDB_CLASS_NAME
Class name for theDBFactoryprovided by leveldb.- See Also:
-
DB_FACTORY_PROPERTY
The name of a system property that can be set to override the defaultDBFactorylogic. Set to the name of a class that implementsDBFactoryand has a zero-arg constructor.
-
-
Method Details
-
getDefaultDBFactory
public static org.iq80.leveldb.DBFactory getDefaultDBFactory()Get the defaultDBFactory.This method first tries the class specified by the
DB_FACTORY_PROPERTYsystem property, if any, then leveldbjni, and finally leveldb.- Returns:
DBFactoryinstance- Throws:
RuntimeException- if no suitableDBFactoryclass can be found and instantiated- See Also:
-