public void delete(byte[] key) throws DBException { delete(key, new WriteOptions()); }
public byte[] get(byte[] key) throws DBException { if( db==null ) { throw new DBException("Closed"); } return get(key, new ReadOptions()); }
public DBIterator iterator() { return iterator(new ReadOptions()); }
public DBIterator iterator(ReadOptions options) { if( db==null ) { throw new DBException("Closed"); } return new JniDBIterator(db.iterator(convert(options))); }
public void put(byte[] key, byte[] value) throws DBException { put(key, value, new WriteOptions()); }
public void write(WriteBatch updates) throws DBException { write(updates, new WriteOptions()); }
public DB open(File path, Options options) throws IOException { NativeDB db=null; OptionsResourceHolder holder = new OptionsResourceHolder(); try { holder.init(options); db = NativeDB.open(holder.options, path); } finally { // if we could not open up the DB, then clean up the // other allocated native resouces.. if(db==null) { holder.close(); } } return new JniDB(db, holder.cache, holder.comparator, holder.logger); }
public DBIterator iterator(ReadOptions options) { if( db==null ) { throw new DBException("Closed"); } return new JniDBIterator(db.iterator(convert(options))); }
public void put(byte[] key, byte[] value) throws DBException { put(key, value, new WriteOptions()); }
public void write(WriteBatch updates) throws DBException { write(updates, new WriteOptions()); }
public DB open(File path, Options options) throws IOException { NativeDB db=null; OptionsResourceHolder holder = new OptionsResourceHolder(); try { holder.init(options); db = NativeDB.open(holder.options, path); } finally { // if we could not open up the DB, then clean up the // other allocated native resouces.. if(db==null) { holder.close(); } } return new JniDB(db, holder.cache, holder.comparator, holder.logger); }
public DBIterator iterator(ReadOptions options) { if( db==null ) { throw new DBException("Closed"); } return new JniDBIterator(db.iterator(convert(options))); }
public byte[] get(byte[] key) throws DBException { if( db==null ) { throw new DBException("Closed"); } return get(key, new ReadOptions()); }
public DBIterator iterator() { return iterator(new ReadOptions()); }
public void put(byte[] key, byte[] value) throws DBException { put(key, value, new WriteOptions()); }
public void write(WriteBatch updates) throws DBException { write(updates, new WriteOptions()); }
public void delete(byte[] key) throws DBException { delete(key, new WriteOptions()); }
public DB open(File path, Options options) throws IOException { NativeDB db=null; OptionsResourceHolder holder = new OptionsResourceHolder(); try { holder.init(options); db = NativeDB.open(holder.options, path); } finally { // if we could not open up the DB, then clean up the // other allocated native resouces.. if(db==null) { holder.close(); } } return new JniDB(db, holder.cache, holder.comparator, holder.logger); }
public Snapshot put(byte[] key, byte[] value, WriteOptions options) throws DBException { if( db==null ) { throw new DBException("Closed"); } try { db.put(convert(options), key, value); return null; } catch (NativeDB.DBException e) { throw new DBException(e.getMessage(), e); } }
public byte[] get(byte[] key) throws DBException { if( db==null ) { throw new DBException("Closed"); } return get(key, new ReadOptions()); }