Class JniDB
java.lang.Object
org.fusesource.leveldbjni.internal.JniDB
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterable<Map.Entry<byte[],,byte[]>> org.iq80.leveldb.DB
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate NativeCacheprivate NativeComparatorprivate NativeDBprivate NativeLogger -
Constructor Summary
ConstructorsConstructorDescriptionJniDB(NativeDB db, NativeCache cache, NativeComparator comparator, NativeLogger logger) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidcompactRange(byte[] begin, byte[] end) private NativeReadOptionsconvert(org.iq80.leveldb.ReadOptions options) private NativeWriteOptionsconvert(org.iq80.leveldb.WriteOptions options) org.iq80.leveldb.WriteBatchvoiddelete(byte[] key) org.iq80.leveldb.Snapshotdelete(byte[] key, org.iq80.leveldb.WriteOptions options) byte[]get(byte[] key) byte[]get(byte[] key, org.iq80.leveldb.ReadOptions options) long[]getApproximateSizes(org.iq80.leveldb.Range... ranges) getProperty(String name) org.iq80.leveldb.Snapshotorg.iq80.leveldb.DBIteratoriterator()org.iq80.leveldb.DBIteratoriterator(org.iq80.leveldb.ReadOptions options) voidput(byte[] key, byte[] value) org.iq80.leveldb.Snapshotput(byte[] key, byte[] value, org.iq80.leveldb.WriteOptions options) voidvoidvoidwrite(org.iq80.leveldb.WriteBatch updates) org.iq80.leveldb.Snapshotwrite(org.iq80.leveldb.WriteBatch updates, org.iq80.leveldb.WriteOptions options) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
db
-
cache
-
comparator
-
logger
-
-
Constructor Details
-
JniDB
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
get
public byte[] get(byte[] key) throws org.iq80.leveldb.DBException - Specified by:
getin interfaceorg.iq80.leveldb.DB- Throws:
org.iq80.leveldb.DBException
-
get
public byte[] get(byte[] key, org.iq80.leveldb.ReadOptions options) throws org.iq80.leveldb.DBException - Specified by:
getin interfaceorg.iq80.leveldb.DB- Throws:
org.iq80.leveldb.DBException
-
iterator
public org.iq80.leveldb.DBIterator iterator() -
iterator
public org.iq80.leveldb.DBIterator iterator(org.iq80.leveldb.ReadOptions options) - Specified by:
iteratorin interfaceorg.iq80.leveldb.DB
-
put
public void put(byte[] key, byte[] value) throws org.iq80.leveldb.DBException - Specified by:
putin interfaceorg.iq80.leveldb.DB- Throws:
org.iq80.leveldb.DBException
-
delete
public void delete(byte[] key) throws org.iq80.leveldb.DBException - Specified by:
deletein interfaceorg.iq80.leveldb.DB- Throws:
org.iq80.leveldb.DBException
-
write
public void write(org.iq80.leveldb.WriteBatch updates) throws org.iq80.leveldb.DBException - Specified by:
writein interfaceorg.iq80.leveldb.DB- Throws:
org.iq80.leveldb.DBException
-
createWriteBatch
public org.iq80.leveldb.WriteBatch createWriteBatch()- Specified by:
createWriteBatchin interfaceorg.iq80.leveldb.DB
-
put
public org.iq80.leveldb.Snapshot put(byte[] key, byte[] value, org.iq80.leveldb.WriteOptions options) throws org.iq80.leveldb.DBException - Specified by:
putin interfaceorg.iq80.leveldb.DB- Throws:
org.iq80.leveldb.DBException
-
delete
public org.iq80.leveldb.Snapshot delete(byte[] key, org.iq80.leveldb.WriteOptions options) throws org.iq80.leveldb.DBException - Specified by:
deletein interfaceorg.iq80.leveldb.DB- Throws:
org.iq80.leveldb.DBException
-
write
public org.iq80.leveldb.Snapshot write(org.iq80.leveldb.WriteBatch updates, org.iq80.leveldb.WriteOptions options) throws org.iq80.leveldb.DBException - Specified by:
writein interfaceorg.iq80.leveldb.DB- Throws:
org.iq80.leveldb.DBException
-
getSnapshot
public org.iq80.leveldb.Snapshot getSnapshot()- Specified by:
getSnapshotin interfaceorg.iq80.leveldb.DB
-
getApproximateSizes
public long[] getApproximateSizes(org.iq80.leveldb.Range... ranges) - Specified by:
getApproximateSizesin interfaceorg.iq80.leveldb.DB
-
getProperty
- Specified by:
getPropertyin interfaceorg.iq80.leveldb.DB
-
convert
-
convert
-
compactRange
public void compactRange(byte[] begin, byte[] end) throws org.iq80.leveldb.DBException - Specified by:
compactRangein interfaceorg.iq80.leveldb.DB- Throws:
org.iq80.leveldb.DBException
-
suspendCompactions
- Specified by:
suspendCompactionsin interfaceorg.iq80.leveldb.DB- Throws:
InterruptedException
-
resumeCompactions
public void resumeCompactions()- Specified by:
resumeCompactionsin interfaceorg.iq80.leveldb.DB
-