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) |
forEach, spliterator
byte[] get(byte[] key) throws DBException
DBException
byte[] get(byte[] key, ReadOptions options) throws DBException
DBException
DBIterator iterator()
DBIterator iterator(ReadOptions options)
void put(byte[] key, byte[] value) throws DBException
DBException
void delete(byte[] key) throws DBException
DBException
void write(WriteBatch updates) throws DBException
DBException
WriteBatch createWriteBatch()
Snapshot put(byte[] key, byte[] value, WriteOptions options) throws DBException
DBException
Snapshot delete(byte[] key, WriteOptions options) throws DBException
DBException
Snapshot write(WriteBatch updates, WriteOptions options) throws DBException
DBException
Snapshot getSnapshot()
long[] getApproximateSizes(Range... ranges)
void suspendCompactions() throws InterruptedException
InterruptedException
void 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 keyDBException
Copyright © 2011–2019. All rights reserved.