7 #ifndef FIELDCACHEIMPL_H
8 #define FIELDCACHEIMPL_H
virtual void purgeAllCaches()
Instructs the FieldCache to forcibly expunge all entries from the underlying caches. This is intended only to be used for test methods as a way to ensure a known base state of the Cache. It should not be relied on for "Cache maintenance" in general application code.
StringCache(const FieldCachePtr &wrapper=FieldCachePtr())
virtual boost::any createValue(const IndexReaderPtr &reader, const EntryPtr &key)
virtual boost::any createValue(const IndexReaderPtr &reader, const EntryPtr &key)
boost::shared_ptr< FieldCache > FieldCachePtr
Definition: LuceneTypes.h:334
Definition: FieldCacheImpl.h:51
Definition: FieldCacheImpl.h:94
boost::weak_ptr< FieldCache > FieldCacheWeakPtr
Definition: LuceneTypes.h:334
virtual boost::any createValue(const IndexReaderPtr &reader, const EntryPtr &key)=0
boost::shared_ptr< InfoStream > InfoStreamPtr
Definition: LuceneTypes.h:532
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
Definition: FieldCacheImpl.h:138
Definition: FieldCacheImpl.h:105
boost::shared_ptr< DoubleParser > DoubleParserPtr
Definition: LuceneTypes.h:328
WeakMapLuceneObjectMapEntryAny readerCache
Definition: FieldCacheImpl.h:81
virtual boost::any createValue(const IndexReaderPtr &reader, const EntryPtr &key)
Definition: FieldCacheImpl.h:149
virtual int32_t hashCode()
Composes a hashcode based on the field and type.
StringIndexCache(const FieldCachePtr &wrapper=FieldCachePtr())
virtual String getFieldName()
virtual Collection< FieldCacheEntryPtr > getCacheEntries()
Generates an array of CacheEntry objects representing all items currently in the FieldCache.
virtual StringIndexPtr getStringIndex(const IndexReaderPtr &reader, const String &field)
Checks the internal cache for an appropriate entry, and if none are found reads the term values in fi...
MapStringCache caches
Definition: FieldCacheImpl.h:20
Internal cache.
Definition: FieldCacheImpl.h:72
FieldCacheWeakPtr _wrapper
Definition: FieldCacheImpl.h:77
boost::any custom
Definition: FieldCacheImpl.h:61
Cache(const FieldCachePtr &wrapper=FieldCachePtr())
String fieldName
Definition: FieldCacheImpl.h:169
FieldCacheEntryImpl(const LuceneObjectPtr &readerKey, const String &fieldName, int32_t cacheType, const boost::any &custom, const boost::any &value)
Definition: FieldCacheImpl.h:127
virtual boost::any getCustom()
virtual Collection< uint8_t > getBytes(const IndexReaderPtr &reader, const String &field)
Checks the internal cache for an appropriate entry, and if none are found, reads the terms in field a...
virtual int32_t getCacheType()
boost::any value
Definition: FieldCacheImpl.h:172
LongCache(const FieldCachePtr &wrapper=FieldCachePtr())
virtual void purge(const IndexReaderPtr &r)
Remove this reader from the cache, if present.
virtual InfoStreamPtr getInfoStream()
virtual LuceneObjectPtr getReaderKey()
The default cache implementation, storing all values in memory. A WeakHashMap is used for storage...
Definition: FieldCacheImpl.h:15
boost::shared_ptr< ByteParser > ByteParserPtr
Definition: LuceneTypes.h:289
virtual boost::any createValue(const IndexReaderPtr &reader, const EntryPtr &key)
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition: LuceneTypes.h:157
int32_t cacheType
Definition: FieldCacheImpl.h:170
Base class for all Lucene classes.
Definition: LuceneObject.h:31
virtual ~FieldCacheEntryImpl()
IntCache(const FieldCachePtr &wrapper=FieldCachePtr())
virtual Collection< double > getDoubles(const IndexReaderPtr &reader, const String &field)
Checks the internal cache for an appropriate entry, and if none are found, reads the terms in field a...
virtual ~StringIndexCache()
boost::shared_ptr< Entry > EntryPtr
Definition: LuceneTypes.h:331
String field
Definition: FieldCacheImpl.h:57
InfoStreamPtr infoStream
Definition: FieldCacheImpl.h:24
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Definition: AbstractAllTermDocs.h:12
Definition: FieldCacheImpl.h:116
virtual void setInfoStream(const InfoStreamPtr &stream)
If non-null, FieldCacheImpl will warn whenever entries are created that are not sane according to Fie...
boost::shared_ptr< IntParser > IntParserPtr
Definition: LuceneTypes.h:376
DoubleCache(const FieldCachePtr &wrapper=FieldCachePtr())
Definition: FieldCacheImpl.h:160
A unique Identifier/Description for each item in the FieldCache. Can be useful for logging/debugging...
Definition: FieldCache.h:255
virtual Collection< int32_t > getInts(const IndexReaderPtr &reader, const String &field)
Checks the internal cache for an appropriate entry, and if none are found, reads the terms in field a...
virtual Collection< int64_t > getLongs(const IndexReaderPtr &reader, const String &field)
Checks the internal cache for an appropriate entry, and if none are found, reads the terms in field a...
virtual bool equals(const LuceneObjectPtr &other)
Two of these are equal if they reference the same field and type.
virtual ~FieldCacheImpl()
virtual void purge(const IndexReaderPtr &r)
Drops all cache entries associated with this reader. NOTE: this reader must precisely match the reade...
virtual Collection< String > getStrings(const IndexReaderPtr &reader, const String &field)
Checks the internal cache for an appropriate entry, and if none are found, reads the term values in f...
boost::shared_ptr< LongParser > LongParserPtr
Definition: LuceneTypes.h:378
boost::shared_ptr< StringIndex > StringIndexPtr
Definition: LuceneTypes.h:460
virtual boost::any createValue(const IndexReaderPtr &reader, const EntryPtr &key)
Maintains caches of term values.
Definition: FieldCache.h:17
ByteCache(const FieldCachePtr &wrapper=FieldCachePtr())
virtual boost::any getValue()
boost::any custom
Definition: FieldCacheImpl.h:171
LuceneObjectPtr readerKey
Definition: FieldCacheImpl.h:165
Entry(const String &field, const boost::any &custom)
Creates one of these objects for a custom comparator/parser.
virtual void initialize()
Called directly after instantiation to create objects that depend on this object being fully construc...
virtual boost::any createValue(const IndexReaderPtr &reader, const EntryPtr &key)
virtual void printNewInsanity(const InfoStreamPtr &infoStream, const boost::any &value)