|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.search.Filter
net.conquiris.lucene.search.GuavaCachingFilter
public final class GuavaCachingFilter
A wrapping filter based on Guava Cache. Uses a caching mode equivalent to Lucene's
DeletesMode.RECACHE.
| Constructor Summary | |
|---|---|
GuavaCachingFilter(Filter filter)
Constructor with a maximum size of 100 elements and a expiration time of 10 minutes. |
|
GuavaCachingFilter(Filter filter,
int size,
long duration,
TimeUnit unit)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
|
DocIdSet |
getDocIdSet(IndexReader reader)
|
int |
hashCode()
|
CacheStats |
stats()
Returns a current snapshot of this cache's cumulative statistics. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GuavaCachingFilter(Filter filter,
int size,
long duration,
TimeUnit unit)
filter - Filter to cache results of.size - the maximum size of the cache.duration - the length of time after an entry is last accessed that it should be
automatically removed.unit - the unit that duration is expressed in
IllegalArgumentException - if size is negative
IllegalArgumentException - if duration is negativepublic GuavaCachingFilter(Filter filter)
filter - Filter to cache results of| Method Detail |
|---|
public DocIdSet getDocIdSet(IndexReader reader)
throws IOException
getDocIdSet in class FilterIOExceptionpublic CacheStats stats()
public String toString()
toString in class Objectpublic boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||