Modifier and Type | Class and Description |
---|---|
class |
ObjectDb.KeyIterator
Iterate over keys
The cursor is closed when all the pairs have been read or when there is an error.
|
Constructor and Description |
---|
ObjectDb(File path) |
ObjectDb(File path,
boolean isNew)
Creates a new object database.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close and flush the concept database.
|
void |
flush() |
V |
get(String key)
Returns the value associated with the key, or null if none exists.
|
com.sleepycat.je.Database |
getDb()
Gets the underlying database.
|
com.sleepycat.je.Environment |
getEnvironment()
Gets the underlying database environment.
|
boolean |
isEmpty() |
Iterator<org.apache.commons.lang3.tuple.Pair<String,V>> |
iterator()
Iterate over key / value pairs.
|
Iterator<String> |
keyIterator() |
void |
put(String key,
V record)
Add or replace an entry in the object database.
|
void |
remove(String key) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public ObjectDb(File path) throws IOException, com.sleepycat.je.DatabaseException
IOException
com.sleepycat.je.DatabaseException
public ObjectDb(File path, boolean isNew) throws IOException, com.sleepycat.je.DatabaseException
path
- Path to the directory containing the dictionary.isNew
- If true, resets the mapper database.IOException
com.sleepycat.je.DatabaseException
public V get(String key) throws com.sleepycat.je.DatabaseException, IOException, ClassNotFoundException
key
- com.sleepycat.je.DatabaseException
IOException
ClassNotFoundException
public void put(String key, V record) throws com.sleepycat.je.DatabaseException, IOException
key
- record
- com.sleepycat.je.DatabaseException
IOException
public void close() throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
public void flush()
public void remove(String key) throws UnsupportedEncodingException, com.sleepycat.je.DatabaseException
UnsupportedEncodingException
com.sleepycat.je.DatabaseException
public boolean isEmpty()
public com.sleepycat.je.Database getDb()
public com.sleepycat.je.Environment getEnvironment()
public Iterator<org.apache.commons.lang3.tuple.Pair<String,V>> iterator()
iterator
in interface Iterable<org.apache.commons.lang3.tuple.Pair<String,V extends Serializable>>
Copyright © 2018. All rights reserved.