|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.archive.wayback.util.bdb.BDBMap
public class BDBMap
Generic class for simple key-value pair lookup using BDBJE.
| Field Summary | |
|---|---|
protected com.sleepycat.je.Database |
db
|
protected String |
dir
|
protected com.sleepycat.je.Environment |
env
|
protected String |
name
|
| Constructor Summary | |
|---|---|
BDBMap(String name,
String dir)
consturctor |
|
| Method Summary | |
|---|---|
static void |
addTimestampForId(String context,
String ip,
String time)
associate timestamp time with idenfier ip persistantly |
String |
get(String keyStr)
retrieve the value assoicated with keyStr from persistant storage |
static BDBMap |
getContextMap(String context)
|
static String |
getTimestampForId(String context,
String ip)
return the timestamp associated with the identifier argument, or now if no value is associated or something goes wrong. |
protected void |
init()
|
void |
put(String keyStr,
String valueStr)
persistantly store key-value pair |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected com.sleepycat.je.Environment env
protected com.sleepycat.je.Database db
protected String name
protected String dir
| Constructor Detail |
|---|
public BDBMap(String name,
String dir)
name - of databasedir - path of directory where dbd files should be stored. The
directory is created if it does not exist.| Method Detail |
|---|
protected void init()
public void put(String keyStr,
String valueStr)
keyStr - valueStr - public String get(String keyStr)
keyStr -
public static BDBMap getContextMap(String context)
context -
public static String getTimestampForId(String context,
String ip)
context - ip -
public static void addTimestampForId(String context,
String ip,
String time)
context - ip - time -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||