Class JniDB

java.lang.Object
org.fusesource.leveldbjni.internal.JniDB
All Implemented Interfaces:
Closeable, AutoCloseable, Iterable<Map.Entry<byte[],byte[]>>, org.iq80.leveldb.DB

public class JniDB extends Object implements org.iq80.leveldb.DB
  • Field Details

  • Constructor Details

  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • get

      public byte[] get(byte[] key) throws org.iq80.leveldb.DBException
      Specified by:
      get in interface org.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:
      get in interface org.iq80.leveldb.DB
      Throws:
      org.iq80.leveldb.DBException
    • iterator

      public org.iq80.leveldb.DBIterator iterator()
      Specified by:
      iterator in interface org.iq80.leveldb.DB
      Specified by:
      iterator in interface Iterable<Map.Entry<byte[],byte[]>>
    • iterator

      public org.iq80.leveldb.DBIterator iterator(org.iq80.leveldb.ReadOptions options)
      Specified by:
      iterator in interface org.iq80.leveldb.DB
    • put

      public void put(byte[] key, byte[] value) throws org.iq80.leveldb.DBException
      Specified by:
      put in interface org.iq80.leveldb.DB
      Throws:
      org.iq80.leveldb.DBException
    • delete

      public void delete(byte[] key) throws org.iq80.leveldb.DBException
      Specified by:
      delete in interface org.iq80.leveldb.DB
      Throws:
      org.iq80.leveldb.DBException
    • write

      public void write(org.iq80.leveldb.WriteBatch updates) throws org.iq80.leveldb.DBException
      Specified by:
      write in interface org.iq80.leveldb.DB
      Throws:
      org.iq80.leveldb.DBException
    • createWriteBatch

      public org.iq80.leveldb.WriteBatch createWriteBatch()
      Specified by:
      createWriteBatch in interface org.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:
      put in interface org.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:
      delete in interface org.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:
      write in interface org.iq80.leveldb.DB
      Throws:
      org.iq80.leveldb.DBException
    • getSnapshot

      public org.iq80.leveldb.Snapshot getSnapshot()
      Specified by:
      getSnapshot in interface org.iq80.leveldb.DB
    • getApproximateSizes

      public long[] getApproximateSizes(org.iq80.leveldb.Range... ranges)
      Specified by:
      getApproximateSizes in interface org.iq80.leveldb.DB
    • getProperty

      public String getProperty(String name)
      Specified by:
      getProperty in interface org.iq80.leveldb.DB
    • convert

      private NativeReadOptions convert(org.iq80.leveldb.ReadOptions options)
    • convert

      private NativeWriteOptions convert(org.iq80.leveldb.WriteOptions options)
    • compactRange

      public void compactRange(byte[] begin, byte[] end) throws org.iq80.leveldb.DBException
      Specified by:
      compactRange in interface org.iq80.leveldb.DB
      Throws:
      org.iq80.leveldb.DBException
    • suspendCompactions

      public void suspendCompactions() throws InterruptedException
      Specified by:
      suspendCompactions in interface org.iq80.leveldb.DB
      Throws:
      InterruptedException
    • resumeCompactions

      public void resumeCompactions()
      Specified by:
      resumeCompactions in interface org.iq80.leveldb.DB