Modifier and Type | Class and Description |
---|---|
static class |
DbImpl.BackgroundProcessingException |
static class |
DbImpl.DatabaseShutdownException |
Constructor and Description |
---|
DbImpl(Options options,
File databaseDir) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public DbImpl(Options options, File databaseDir) throws IOException
IOException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public String getProperty(String name)
getProperty
in interface DB
public void flushMemTable()
public void checkBackgroundException()
public byte[] get(byte[] key) throws DBException
get
in interface DB
DBException
public byte[] get(byte[] key, ReadOptions options) throws DBException
get
in interface DB
DBException
public void put(byte[] key, byte[] value) throws DBException
put
in interface DB
DBException
public Snapshot put(byte[] key, byte[] value, WriteOptions options) throws DBException
put
in interface DB
DBException
public void delete(byte[] key) throws DBException
delete
in interface DB
DBException
public Snapshot delete(byte[] key, WriteOptions options) throws DBException
delete
in interface DB
DBException
public void write(WriteBatch updates) throws DBException
write
in interface DB
DBException
public Snapshot write(WriteBatch updates, WriteOptions options) throws DBException
write
in interface DB
DBException
public Snapshot writeInternal(WriteBatchImpl updates, WriteOptions options) throws DBException
DBException
public WriteBatch createWriteBatch()
createWriteBatch
in interface DB
public SeekingIteratorAdapter iterator()
public SeekingIteratorAdapter iterator(ReadOptions options)
public Snapshot getSnapshot()
getSnapshot
in interface DB
public void compactMemTable() throws IOException
IOException
public long[] getApproximateSizes(Range... ranges)
getApproximateSizes
in interface DB
public long getApproximateSizes(Range range)
public long getMaxNextLevelOverlappingBytes()
public void suspendCompactions() throws InterruptedException
suspendCompactions
in interface DB
InterruptedException
public void resumeCompactions()
resumeCompactions
in interface DB
public void compactRange(byte[] begin, byte[] end) throws DBException
compactRange
in interface DB
DBException
Copyright © 2011–2019. All rights reserved.