gov.lanl.archive.index.bdb
Class IndexImplB
java.lang.Object
gov.lanl.archive.index.bdb.IndexImplB
- All Implemented Interfaces:
- Index
public class IndexImplB
- extends Object
- implements Index
Method Summary |
boolean |
add(Memento m)
|
void |
addHeaders(Memento m,
com.sleepycat.je.Transaction txn)
|
void |
addLast(String url,
com.sleepycat.je.Transaction txn)
|
Memento |
check_last(String url,
com.sleepycat.je.Transaction txn)
|
void |
close()
Close current index instance |
void |
closeDatabases()
Close databases related to env; call before close. |
void |
delete_by_date_url(String url,
String date,
CallBack callback)
|
void |
delete_by_date(String date,
CallBack callback)
|
void |
delete_by_domain(String url,
CallBack callback)
|
void |
delete_by_url(String url,
CallBack callback)
|
void |
delete(String rurl,
String date,
CallBack callback)
|
Memento |
get(String url,
Date accessdatetime)
|
BDBEnv |
getDbEnvironment()
|
String |
getFirst(String url)
|
int |
getHits(String url,
String startDate,
String endDate)
|
String |
getId(String url,
String datestr)
|
String |
getLast(String url)
|
Memento |
getMemento(String url,
Date date)
|
List |
getMementos(String rurl)
|
Date |
getRecent(String rurl)
|
Map |
getStats()
|
List |
getUntil(String date,
String startkey)
|
String |
getValidityB(String datestr,
String url)
|
void |
insertRecord_to_headers_blob(Memento m,
com.sleepycat.je.Transaction txn)
|
void |
insertRecord_to_stats(Memento m,
com.sleepycat.je.Transaction txn)
|
void |
insertRecord(Memento m,
com.sleepycat.je.Transaction txn)
|
HeadersRecord |
MementoToHeadersRecord(Memento m)
|
ResourceRecord |
MementoToResourceRecord(Memento m)
|
StatsRecord |
MementoToStatsRecord(Memento m)
|
String |
NormalizeUrl(String url)
|
void |
open(boolean readonly)
Open an index instance |
void |
printRecord(Memento m)
|
void |
processUnload(String date,
UnloadCallBack unloadcallback)
|
void |
removeRecord(Memento m,
com.sleepycat.je.Transaction txn)
|
void |
ResourceRecordToMemento(ResourceRecord rec,
Memento m)
|
void |
setDbEnvironment(BDBEnv dbEnvironment)
|
void |
setMemento(Memento m,
String date,
String url,
String fdate,
String ldate)
|
void |
setNMemento(Memento m,
String date,
String url,
String fdate,
String ldate)
|
void |
update_storage(com.sleepycat.je.Transaction txn,
String url,
String datestr,
CallBack callback,
String previd)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bdbEnv
protected BDBEnv bdbEnv
DB_PATH
public static final String DB_PATH
databaseDirectory
protected String databaseDirectory
readOnly
protected boolean readOnly
IndexImplB
public IndexImplB()
NormalizeUrl
public String NormalizeUrl(String url)
add
public boolean add(Memento m)
- Specified by:
add
in interface Index
addLast
public void addLast(String url,
com.sleepycat.je.Transaction txn)
check_last
public Memento check_last(String url,
com.sleepycat.je.Transaction txn)
insertRecord
public void insertRecord(Memento m,
com.sleepycat.je.Transaction txn)
insertRecord_to_headers_blob
public void insertRecord_to_headers_blob(Memento m,
com.sleepycat.je.Transaction txn)
insertRecord_to_stats
public void insertRecord_to_stats(Memento m,
com.sleepycat.je.Transaction txn)
addHeaders
public void addHeaders(Memento m,
com.sleepycat.je.Transaction txn)
removeRecord
public void removeRecord(Memento m,
com.sleepycat.je.Transaction txn)
getMementos
public List getMementos(String rurl)
- Specified by:
getMementos
in interface Index
getUntil
public List getUntil(String date,
String startkey)
- Specified by:
getUntil
in interface Index
getStats
public Map getStats()
getValidityB
public String getValidityB(String datestr,
String url)
getHits
public int getHits(String url,
String startDate,
String endDate)
processUnload
public void processUnload(String date,
UnloadCallBack unloadcallback)
- Specified by:
processUnload
in interface Index
getLast
public String getLast(String url)
getFirst
public String getFirst(String url)
getId
public String getId(String url,
String datestr)
getMemento
public Memento getMemento(String url,
Date date)
MementoToResourceRecord
public ResourceRecord MementoToResourceRecord(Memento m)
MementoToHeadersRecord
public HeadersRecord MementoToHeadersRecord(Memento m)
MementoToStatsRecord
public StatsRecord MementoToStatsRecord(Memento m)
ResourceRecordToMemento
public void ResourceRecordToMemento(ResourceRecord rec,
Memento m)
printRecord
public void printRecord(Memento m)
setMemento
public void setMemento(Memento m,
String date,
String url,
String fdate,
String ldate)
throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
setNMemento
public void setNMemento(Memento m,
String date,
String url,
String fdate,
String ldate)
throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
open
public void open(boolean readonly)
- Open an index instance
- Parameters:
readonly
- allow index modification
closeDatabases
public void closeDatabases()
throws Exception
- Close databases related to env; call before close. Closes the databases, but not the env
- Throws:
IndexException
Exception
close
public void close()
- Close current index instance
- Specified by:
close
in interface Index
getDbEnvironment
public BDBEnv getDbEnvironment()
setDbEnvironment
public void setDbEnvironment(BDBEnv dbEnvironment)
get
public Memento get(String url,
Date accessdatetime)
- Specified by:
get
in interface Index
getRecent
public Date getRecent(String rurl)
- Specified by:
getRecent
in interface Index
delete
public void delete(String rurl,
String date,
CallBack callback)
- Specified by:
delete
in interface Index
delete_by_url
public void delete_by_url(String url,
CallBack callback)
delete_by_date_url
public void delete_by_date_url(String url,
String date,
CallBack callback)
update_storage
public void update_storage(com.sleepycat.je.Transaction txn,
String url,
String datestr,
CallBack callback,
String previd)
delete_by_date
public void delete_by_date(String date,
CallBack callback)
delete_by_domain
public void delete_by_domain(String url,
CallBack callback)
Copyright © 2013. All Rights Reserved.