Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.util.search
Class CachedFilter

java.lang.Object
  extended by org.apache.lucene.search.Filter
      extended by com.jivesoftware.util.search.CachedFilter
All Implemented Interfaces:
Cacheable, java.io.Serializable

public class CachedFilter
extends org.apache.lucene.search.Filter
implements Cacheable

CachedFilter is an extension of Lucene's Filter class which caches the bitset result of the filter. This only works in conjunction with the above FilterCache since filter caching will return invalid or miss results if the search index is modified.

See Also:
Serialized Form

Constructor Summary
CachedFilter(org.apache.lucene.search.Filter filter)
           
 
Method Summary
 java.util.BitSet bits(org.apache.lucene.index.IndexReader reader)
           
 int getCachedSize()
          Returns the approximate size of the Object in bytes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedFilter

public CachedFilter(org.apache.lucene.search.Filter filter)
Method Detail

bits

public java.util.BitSet bits(org.apache.lucene.index.IndexReader reader)
                      throws java.io.IOException
Specified by:
bits in class org.apache.lucene.search.Filter
Throws:
java.io.IOException

getCachedSize

public int getCachedSize()
Description copied from interface: Cacheable
Returns the approximate size of the Object in bytes. The size should be considered to be a best estimate of how much memory the Object occupies and may be based on empirical trials or dynamic calculations.

Specified by:
getCachedSize in interface Cacheable
Returns:
the size of the Object in bytes.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.