Constructor and Description |
---|
BDBRecordSet() |
Modifier and Type | Method and Description |
---|---|
static String |
bytesToString(byte[] ba) |
void |
delete(String keyStr) |
String |
get(String keyStr)
retrieve the value assoicated with keyStr from persistant storage
|
String |
getDbName() |
String |
getPath() |
void |
initializeDB(String thePath,
String theDbName) |
void |
insertRecords(Iterator<BDBRecord> itr) |
void |
put(String keyStr,
String valueStr)
persistantly store key-value pair
|
BDBRecordIterator |
recordIterator(String startKey) |
BDBRecordIterator |
recordIterator(String startKey,
boolean forward) |
void |
setDbName(String dbName) |
void |
setPath(String path) |
void |
shutdownDB()
shut down the BDB.
|
static byte[] |
stringToBytes(String s) |
public void initializeDB(String thePath, String theDbName) throws IOException
thePath
- Directory where BDBJE files are storedtheDbName
- Name of files in thePathIOException
- for usual reasons, plus as database exceptionspublic void shutdownDB() throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
public static byte[] stringToBytes(String s)
s
- public static String bytesToString(byte[] ba)
ba
- public BDBRecordIterator recordIterator(String startKey) throws com.sleepycat.je.DatabaseException
startKey
- com.sleepycat.je.DatabaseException
public BDBRecordIterator recordIterator(String startKey, boolean forward) throws com.sleepycat.je.DatabaseException
startKey
- forward
- com.sleepycat.je.DatabaseException
public void put(String keyStr, String valueStr) throws com.sleepycat.je.DatabaseException
keyStr
- valueStr
- com.sleepycat.je.DatabaseException
public String get(String keyStr) throws com.sleepycat.je.DatabaseException
keyStr
- com.sleepycat.je.DatabaseException
public void delete(String keyStr) throws com.sleepycat.je.DatabaseException
keyStr
- com.sleepycat.je.DatabaseException
public String getDbName()
public String getPath()
public void setPath(String path)
path
- the path to setpublic void setDbName(String dbName)
dbName
- the dbName to setCopyright © 2005–2015 IIPC. All rights reserved.