| Modifier and Type | Class and Description |
|---|---|
static class |
DbImpl.BackgroundProcessingException |
static class |
DbImpl.DatabaseShutdownException |
| Constructor and Description |
|---|
DbImpl(Options options,
File databaseDir) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkBackgroundException() |
void |
close() |
void |
compactMemTable() |
void |
compactRange(byte[] begin,
byte[] end)
Force a compaction of the specified key range.
|
void |
compactRange(int level,
Slice start,
Slice end) |
WriteBatch |
createWriteBatch() |
void |
delete(byte[] key) |
Snapshot |
delete(byte[] key,
WriteOptions options) |
void |
flushMemTable() |
byte[] |
get(byte[] key) |
byte[] |
get(byte[] key,
ReadOptions options) |
long[] |
getApproximateSizes(Range... ranges) |
long |
getApproximateSizes(Range range) |
long |
getMaxNextLevelOverlappingBytes() |
String |
getProperty(String name) |
Snapshot |
getSnapshot() |
SeekingIteratorAdapter |
iterator() |
SeekingIteratorAdapter |
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) |
Snapshot |
writeInternal(WriteBatchImpl updates,
WriteOptions options) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic DbImpl(Options options, File databaseDir) throws IOException
IOExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic String getProperty(String name)
getProperty in interface DBpublic void flushMemTable()
public void checkBackgroundException()
public byte[] get(byte[] key)
throws DBException
get in interface DBDBExceptionpublic byte[] get(byte[] key,
ReadOptions options)
throws DBException
get in interface DBDBExceptionpublic void put(byte[] key,
byte[] value)
throws DBException
put in interface DBDBExceptionpublic Snapshot put(byte[] key, byte[] value, WriteOptions options) throws DBException
put in interface DBDBExceptionpublic void delete(byte[] key)
throws DBException
delete in interface DBDBExceptionpublic Snapshot delete(byte[] key, WriteOptions options) throws DBException
delete in interface DBDBExceptionpublic void write(WriteBatch updates) throws DBException
write in interface DBDBExceptionpublic Snapshot write(WriteBatch updates, WriteOptions options) throws DBException
write in interface DBDBExceptionpublic Snapshot writeInternal(WriteBatchImpl updates, WriteOptions options) throws DBException
DBExceptionpublic WriteBatch createWriteBatch()
createWriteBatch in interface DBpublic SeekingIteratorAdapter iterator()
public SeekingIteratorAdapter iterator(ReadOptions options)
public Snapshot getSnapshot()
getSnapshot in interface DBpublic void compactMemTable()
throws IOException
IOExceptionpublic long[] getApproximateSizes(Range... ranges)
getApproximateSizes in interface DBpublic long getApproximateSizes(Range range)
public long getMaxNextLevelOverlappingBytes()
public void suspendCompactions()
throws InterruptedException
DBsuspendCompactions in interface DBInterruptedExceptionpublic void resumeCompactions()
DBresumeCompactions in interface DBpublic void compactRange(byte[] begin,
byte[] end)
throws DBException
DBcompactRange in interface DBbegin - if null then compaction start from the first keyend - if null then compaction ends at the last keyDBExceptionCopyright © 2011–2025. All rights reserved.