Package io.permazen.kv.leveldb
Class LevelDBUtil
java.lang.Object
io.permazen.kv.leveldb.LevelDBUtil
Utility methods for use with LevelDB.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The name of a system property that can be set to override the defaultDBFactory
logic.static final String
Class name for theDBFactory
provided by leveldb.static final String
Class name for theDBFactory
provided by leveldbjni. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.iq80.leveldb.DBFactory
Get the defaultDBFactory
.
-
Field Details
-
LEVELDBJNI_CLASS_NAME
Class name for theDBFactory
provided by leveldbjni.- See Also:
-
LEVELDB_CLASS_NAME
Class name for theDBFactory
provided by leveldb.- See Also:
-
DB_FACTORY_PROPERTY
The name of a system property that can be set to override the defaultDBFactory
logic. Set to the name of a class that implementsDBFactory
and 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_PROPERTY
system property, if any, then leveldbjni, and finally leveldb.- Returns:
DBFactory
instance- Throws:
RuntimeException
- if no suitableDBFactory
class can be found and instantiated- See Also:
-