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