|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectanl.aida.client.Cache
public class Cache
Encapsulates a Cache.
Field Summary | |
---|---|
private java.io.File |
cacheDirectory
|
private java.util.Map<anl.aida.util.DateRange,CacheElement> |
items
|
private Keywords |
keywords
|
private java.io.File |
luceneLocation
|
private anl.aida.util.DateRangeProducer |
ranger
|
private int |
totalDocs
|
Constructor Summary | |
---|---|
Cache(java.io.File luceneLocation,
java.io.File cacheDirectory,
anl.aida.util.DateRangeProducer ranger)
Creates a cache. |
Method Summary | |
---|---|
void |
add(java.lang.String keywordSet,
java.lang.String keyword)
Adds the specified keyword to the specified keyword set in this cache. |
void |
addCacheElement(CacheElement item)
Adds the specified CacheElement to this cache. |
java.lang.Iterable<CacheElement> |
elements()
Gets an iteratble over all the elements in this cache. |
java.io.File |
getCacheDirectory()
Gets the directory where the cache resides. |
CacheElement |
getElement(anl.aida.util.DateRange range)
Gets the element that covers the specified date range. |
CacheElement |
getElement(int id)
Gets the element by its numeric id. |
Keywords |
getKeywords()
Gets the keywords associated with this cache. |
java.io.File |
getLuceneLocation()
Gets the location of this cache's lucene index. |
anl.aida.util.DateRangeProducer |
getRanger()
Gets the DateRangeProducer that covers the date range interval of this Cache. |
int |
getTotalDocs()
Gets the total number of docs in this cache. |
void |
setKeywords(Keywords keywords)
Sets the keywords for this cache. |
int |
size()
Gets the number of cache elements in this cache. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.io.File luceneLocation
private java.io.File cacheDirectory
private java.util.Map<anl.aida.util.DateRange,CacheElement> items
private anl.aida.util.DateRangeProducer ranger
private int totalDocs
private Keywords keywords
Constructor Detail |
---|
public Cache(java.io.File luceneLocation, java.io.File cacheDirectory, anl.aida.util.DateRangeProducer ranger)
luceneLocation
- the location of the lucene index from which the cache was createdranger
- a DateRangeProducer that can produce the date ranges of the individual cache elementsMethod Detail |
---|
public java.io.File getCacheDirectory()
public java.io.File getLuceneLocation()
public int getTotalDocs()
public void addCacheElement(CacheElement item)
item
- the element to addpublic int size()
public CacheElement getElement(int id)
id
- the id of the element to get
public CacheElement getElement(anl.aida.util.DateRange range)
range
- the range of the element to get
public java.lang.Iterable<CacheElement> elements()
public anl.aida.util.DateRangeProducer getRanger()
public void add(java.lang.String keywordSet, java.lang.String keyword)
keywordSet
- the set to add the keyword tokeyword
- the keyword to addpublic Keywords getKeywords()
public void setKeywords(Keywords keywords)
keywords
- the new keywords for this cache
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |