public interface DB extends Iterable<Map.Entry<byte[],byte[]>>, Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
compactRange(byte[] begin,
byte[] end)
Force a compaction of the specified key range.
|
WriteBatch |
createWriteBatch() |
void |
delete(byte[] key) |
Snapshot |
delete(byte[] key,
WriteOptions options) |
byte[] |
get(byte[] key) |
byte[] |
get(byte[] key,
ReadOptions options) |
long[] |
getApproximateSizes(Range... ranges) |
String |
getProperty(String name) |
Snapshot |
getSnapshot() |
DBIterator |
iterator() |
DBIterator |
iterator(ReadOptions options) |
void |
put(byte[] key,
byte[] value) |
Snapshot |
put(byte[] key,
byte[] value,
WriteOptions options) |
void |
resumeCompactions()
Resumes the background compaction threads.
|
void |
suspendCompactions()
Suspends any background compaction threads.
|
void |
write(WriteBatch updates) |
Snapshot |
write(WriteBatch updates,
WriteOptions options) |
byte[] get(byte[] key)
throws DBException
DBExceptionbyte[] get(byte[] key,
ReadOptions options)
throws DBException
DBExceptionDBIterator iterator()
DBIterator iterator(ReadOptions options)
void put(byte[] key,
byte[] value)
throws DBException
DBExceptionvoid delete(byte[] key)
throws DBException
DBExceptionvoid write(WriteBatch updates) throws DBException
DBExceptionWriteBatch createWriteBatch()
Snapshot put(byte[] key, byte[] value, WriteOptions options) throws DBException
DBExceptionSnapshot delete(byte[] key, WriteOptions options) throws DBException
DBExceptionSnapshot write(WriteBatch updates, WriteOptions options) throws DBException
DBExceptionSnapshot getSnapshot()
long[] getApproximateSizes(Range... ranges)
void suspendCompactions()
throws InterruptedException
InterruptedExceptionvoid resumeCompactions()
void compactRange(byte[] begin,
byte[] end)
throws DBException
begin - if null then compaction start from the first keyend - if null then compaction ends at the last keyDBExceptionCopyright © 2011-2016. All Rights Reserved.