7 #ifndef FIELDCACHEIMPL_H 8 #define FIELDCACHEIMPL_H 54 Entry(
const String& field,
const boost::any& custom);
176 virtual String getFieldName();
177 virtual int32_t getCacheType();
178 virtual boost::any getCustom();
179 virtual boost::any getValue();
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.
boost::shared_ptr< FieldCache > FieldCachePtr
Definition: LuceneTypes.h:334
virtual bool equals(const LuceneObjectPtr &other)
Return whether two objects are equal.
Definition: FieldCacheImpl.h:51
Definition: FieldCacheImpl.h:94
boost::weak_ptr< FieldCache > FieldCacheWeakPtr
Definition: LuceneTypes.h:334
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
Definition: FieldCacheImpl.h:149
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
boost::any custom
Definition: FieldCacheImpl.h:61
String fieldName
Definition: FieldCacheImpl.h:169
Definition: FieldCacheImpl.h:127
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...
boost::any value
Definition: FieldCacheImpl.h:172
virtual InfoStreamPtr getInfoStream()
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
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 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...
boost::shared_ptr< Entry > EntryPtr
Definition: LuceneTypes.h:331
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
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 ~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
Maintains caches of term values.
Definition: FieldCache.h:17
virtual int32_t hashCode()
Return hash code for this object.
boost::any custom
Definition: FieldCacheImpl.h:171
virtual void initialize()
Called directly after instantiation to create objects that depend on this object being fully construc...