7#ifndef FIELDCACHEIMPL_H
8#define FIELDCACHEIMPL_H
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
ByteCache(const FieldCachePtr &wrapper=FieldCachePtr())
virtual boost::any createValue(const IndexReaderPtr &reader, const EntryPtr &key)
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:80
Utility template class to handle collections that can be safely copied and shared.
Definition Collection.h:17
DoubleCache(const FieldCachePtr &wrapper=FieldCachePtr())
virtual boost::any createValue(const IndexReaderPtr &reader, const EntryPtr &key)
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:60
boost::any custom
Definition FieldCacheImpl.h:61
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:168
A unique Identifier/Description for each item in the FieldCache. Can be useful for logging/debugging.
Definition FieldCache.h:255
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 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...
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 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 void setInfoStream(const InfoStreamPtr &stream)
If non-null, FieldCacheImpl will warn whenever entries are created that are not sane according to Fie...
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 initialize()
Called directly after instantiation to create objects that depend on this object being fully construc...
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< 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 purgeAllCaches()
Instructs the FieldCache to forcibly expunge all entries from the underlying caches....
MapStringCache caches
Definition FieldCacheImpl.h:23
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< 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 void purge(const IndexReaderPtr &r)
Drops all cache entries associated with this reader. NOTE: this reader must precisely match the reade...
virtual Collection< FieldCacheEntryPtr > getCacheEntries()
Generates an array of CacheEntry objects representing all items currently in the FieldCache.
virtual InfoStreamPtr getInfoStream()
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...
Maintains caches of term values.
Definition FieldCache.h:17
IntCache(const FieldCachePtr &wrapper=FieldCachePtr())
virtual boost::any createValue(const IndexReaderPtr &reader, const EntryPtr &key)
virtual boost::any createValue(const IndexReaderPtr &reader, const EntryPtr &key)
LongCache(const FieldCachePtr &wrapper=FieldCachePtr())
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)
StringIndexCache(const FieldCachePtr &wrapper=FieldCachePtr())
virtual ~StringIndexCache()
Definition AbstractAllTermDocs.h:12
boost::shared_ptr< IntParser > IntParserPtr
Definition LuceneTypes.h:376
boost::shared_ptr< DoubleParser > DoubleParserPtr
Definition LuceneTypes.h:328
boost::shared_ptr< InfoStream > InfoStreamPtr
Definition LuceneTypes.h:532
boost::shared_ptr< Entry > EntryPtr
Definition LuceneTypes.h:331
boost::shared_ptr< LongParser > LongParserPtr
Definition LuceneTypes.h:378
boost::shared_ptr< ByteParser > ByteParserPtr
Definition LuceneTypes.h:289
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition LuceneTypes.h:539
boost::weak_ptr< FieldCache > FieldCacheWeakPtr
Definition LuceneTypes.h:334
boost::shared_ptr< StringIndex > StringIndexPtr
Definition LuceneTypes.h:460
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition LuceneTypes.h:157
boost::shared_ptr< FieldCache > FieldCachePtr
Definition LuceneTypes.h:334